Skip to main content
1-Visitor
January 21, 2021
Solved

HoloLense: using multiple sequences

  • January 21, 2021
  • 1 reply
  • 1158 views

Hi everyone,

 

in Creo Illustrate I created a .pvz file with:

Figure 1: Sequence "Play 1"

Figure 2: Sequence "Play 2"

 

Now I want to start each sequence with a 3D Button.

I linked "Play 1" to the first 3D-Button - works fine. But HoloLense doesn't have a "Sequence list" so how can I tell the second 3D-Button that he should start "Play 2"?

 

Thanks for your help!

Best answer by sebben

Hi,

 

you can use this function:

$scope.SetSequenceAndPlay = function(NewSeqName)
{
 console.log($scope.app.view["Home"].wdg["model"].sequence);
 $scope.$broadcast('app.view["Home"].wdg["model"].svc.reset'); // Stop playback, if needed, of current sequence
 
 $scope.app.view['Home'].wdg['model']['sequence'] = NewSeqName; // Assign new sequence to the model
 
 $timeout(function() {
 $scope.$broadcast('app.view["Home"].wdg["model"].svc.play'); // Add some delay (in msec) to load the sequence, then play
 },1000);
}

Call it from the Play buttons  with the correct path to the sequence. You can find the path when you select a sequence, call the function and check the console of your browser. It should be something like: 

 

app/resources/Uploaded/MODELNAME/l-Creo 3D - Figure 1.pvi

 

So call for example SetSequenceAndPlay("app/resources/Uploaded/MODELNAME/l-Creo 3D - Figure 1.pvi");  in the Click event of the Play1 button.

 

I hope this helps.

1 reply

sebben14-AlexandriteAnswer
14-Alexandrite
January 21, 2021

Hi,

 

you can use this function:

$scope.SetSequenceAndPlay = function(NewSeqName)
{
 console.log($scope.app.view["Home"].wdg["model"].sequence);
 $scope.$broadcast('app.view["Home"].wdg["model"].svc.reset'); // Stop playback, if needed, of current sequence
 
 $scope.app.view['Home'].wdg['model']['sequence'] = NewSeqName; // Assign new sequence to the model
 
 $timeout(function() {
 $scope.$broadcast('app.view["Home"].wdg["model"].svc.play'); // Add some delay (in msec) to load the sequence, then play
 },1000);
}

Call it from the Play buttons  with the correct path to the sequence. You can find the path when you select a sequence, call the function and check the console of your browser. It should be something like: 

 

app/resources/Uploaded/MODELNAME/l-Creo 3D - Figure 1.pvi

 

So call for example SetSequenceAndPlay("app/resources/Uploaded/MODELNAME/l-Creo 3D - Figure 1.pvi");  in the Click event of the Play1 button.

 

I hope this helps.