Skip to main content
1-Visitor
August 18, 2020
Question

play sequence from button

  • August 18, 2020
  • 1 reply
  • 2251 views

two buttons placed in 2D and a model with 7 sequences loaded into resources

 

1.next

2.play

 

button 1 to load the sequence and button 2 to play the sequence. it works but I have to click them multiple times. 

 

$scope.next = function(){


$scope.view.wdg['model-1'].sequence = "app/resources/Uploaded/l-Creo 3D - 2.pvi";


}


$scope.play = function() {

angular.element(document.getElementById('model-1')).scope().play();

}

1 reply

15-Moonstone
August 19, 2020

$scope.play = function() {

angular.element(document.getElementById('model-1')).scope().play();

}

Use the method playAll() to play all the step of sequence.
 
 

$scope.play = function() {

angular.element(document.getElementById('model-1')).scope().playAll();

}

I Hope to help you
Giuseppe
 
 
krthk86g1-VisitorAuthor
1-Visitor
August 19, 2020

I have used the same code but still, the error persists, I guess the loading of the sequence and apply and sync is the issue here.