cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Multiple .pvz Files

akanoo
8-Gravel

Multiple .pvz Files

I want to load multiple  .pvz files using multiple buttons.

How do I do it?

ACCEPTED SOLUTION

Accepted Solutions

Could you use multiple 3D models (one for each .pvz) and write a function to make them visible/not visible based on the button clicks?

This should work for a basic use case.

 

regards,

Patrick

View solution in original post

4 REPLIES 4

Hi,

 

Depending on what you want to do exactly, there are several ways.

There is a good example in the Help  that uses a Select widget to choose from different models. You should be able to adapt this to your specific needs.

 

regards,

Patrick

Hello Patrick,

 

That was very helpful. But I want to load .pvz upon clicking a button.

Could you use multiple 3D models (one for each .pvz) and write a function to make them visible/not visible based on the button clicks?

This should work for a basic use case.

 

regards,

Patrick

you can use this script to load a .pvz on the model using the button click.

 

$scope.load=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/name.pvz';
};

 

 

$scope.load2=function(){
$scope.view.wdg['model-1']['src'] = 'app/resources/Uploaded/name2.pvz';
};

 

assign calls to the buttons .

 

Button1 -    call             load();

Button2-     call             load2();

 

Bye

 

Giuseppe

 

 

Announcements

Top Tags