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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Is it possible to set a default value for choosing a sequence animation during runtime?

lwietschorke
1-Newbie

Is it possible to set a default value for choosing a sequence animation during runtime?

Hello everyone,

based on Can't use more than one sequence animation in a single experience in ThingWorx studio. I implemented the second solution. When I load the application, there is an empty value set (no animation sequence is selected). I have to choose an animation sequence first. Is it possible to define a default value, e.g. in this case a default sequence which is automatically chosen from the beginning?

Thank you!Screenshot_2017-06-06-09-33-59.png

2 REPLIES 2

You can try setting Model widget's "Model Loaded" event with a JS code that assign the model with the desired Sequence file.

FYI, JS code to set sequence -setWidgetProp( 'model-1', 'sequence', '3D explode.pvi');

Unfortunately this doesn't work with the second solution of Can't use more than one sequence animation in a single experience in ThingWorx studio.​ When implementing the first solution the JS code works fine, but my problem doesn't occur then since there is a sequence seleted from the beginning. I don't know why, but by implementing the second solution the code stops working.

So is there another possibility to assign a default value?

Edit: After I selected a sequence, the code seems to work again (I have two buttons which also reference each to one sequence using the code you proposed. They don't work until I selected a sequence per select bar, but after that I can use them, too).

Top Tags