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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Play a specific step of a sequence

Ace_Rothstein
12-Amethyst

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. 

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.

 

Announcements

Top Tags