Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
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.
Solved! Go to Solution.
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
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.