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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Play a specific step of a sequence

Ace_Rothstein
11-Garnet

Play a specific step of a sequence

I have a number of steps in a sequence and I would like to trigger one particular step only without playing the whole sequence from the beginning. For instance, play step 4 directly by clicking a button. 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi, @Ace_Rothstein 

That's say we have 'model-1' ready and a Sequence selected.

With code in home.js:

$scope.playSpecificStep = function(num){
  $scope.view.wdg['model-1'].currentStep = num;
  $timeout(function() {
    $scope.$broadcast('app.view["model-1"].svc.play')
  }, 200)
}

Specific step could be played with Widget\ Events\ JS Expression like below

playSpecificStep(3); // play step 3
playSpecificStep(7); // play step 7

 

regards,

ClarK

View solution in original post

3 REPLIES 3

Hi, @Ace_Rothstein 

That's say we have 'model-1' ready and a Sequence selected.

With code in home.js:

$scope.playSpecificStep = function(num){
  $scope.view.wdg['model-1'].currentStep = num;
  $timeout(function() {
    $scope.$broadcast('app.view["model-1"].svc.play')
  }, 200)
}

Specific step could be played with Widget\ Events\ JS Expression like below

playSpecificStep(3); // play step 3
playSpecificStep(7); // play step 7

 

regards,

ClarK

Thank you @dsgnrClarK. It works great! Just what I was looking for. However, what if I had multiple sequences/ figures?

Hi, @Ace_Rothstein 

 

You can use the code below to assign sequence

 

 

$scope.view.wdg['model-1'].sequence = 'l-Creo 3D - figure.pvi';

 

Nevertheless, after switching sequence, Playback starts from 1.

And I don't know how to switch sequence and jump step at the same time.

 

Top Tags