Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello together,
I have a question in regards to play sequences with ThingWorx Studio and Dynamic Model Loading.
I have 2 PVZ inserted in one experiences with the help of the dynamic Model Load (selector)
How is it possible to play a sequence from the model chosen by the dropdown?
Thank you for your help on this.
Solved! Go to Solution.
Hi @K_Borrmann,
One way to achieve this scenario is as follows:
$scope.sequence1 = function() {
$scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D - Disassembly-Sequence.pvi';
angular.element(document.getElementById('model-1')).scope().playAll();
$scope.app.params.Model1Button = false;
$scope.app.params.Model2Button = true;
};
$scope.sequence2 = function() {
$scope.view.wdg['model-1']['sequence'] = 'teardown.pvi';
angular.element(document.getElementById('model-1')).scope().playAll();
$scope.app.params.Model1Button = true
$scope.app.params.Model2Button = false
}
Hi @K_Borrmann,
One way to achieve this scenario is as follows:
$scope.sequence1 = function() {
$scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D - Disassembly-Sequence.pvi';
angular.element(document.getElementById('model-1')).scope().playAll();
$scope.app.params.Model1Button = false;
$scope.app.params.Model2Button = true;
};
$scope.sequence2 = function() {
$scope.view.wdg['model-1']['sequence'] = 'teardown.pvi';
angular.element(document.getElementById('model-1')).scope().playAll();
$scope.app.params.Model1Button = true
$scope.app.params.Model2Button = false
}
Hi @M_shah,
I apologize for the delay. We can define javascript functions in the Home.js file as mentioned in the above post to load each sequence file and call these functions on the click event of the respective buttons.