How to play all the Sequences (.pvi), one by one on a single click of a button?
Hi,
I have 5 sequences (5 .pvi files inside my .pvz file) and I want to play all of them one by one on a single click of a button. (Button should remain disabled till all the 5 sequences get completed.)
Next sequence should only be get start after completion of previous sequence. Like an assembly of a some figure/object.
What I have tried so far is (Not working currently):
var modelEle1 = angular.element(document.getElementById('model-1'));
$scope.sequence1 = function() {
$scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D Sequence1';
$timeout(function() {modelEle1.scope().playAll();},600);
}
$scope.sequence2 = function() {
$scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D Sequence2';
$timeout(function() {modelEle1.scope().playAll();},600);
//$scope.view.wdg['model-1']['playAll'] = true; Not working and is it a correct way to call it?
//$scope.view.wdg['button-2']['click'] = true; Not working and is it a correct way to call it?
//I have binded the "button-2" click event with "model-1" playAll service.
}
// I am calling this function on a button-1's click JS Box.
$scope.sequence = function() {
$scope.sequence1();
$scope.sequence2();
}
If there is any other efficient code/method to achieve this functionality, please provide it.
Thank you,
Shashank

