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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

HoloLense: using multiple sequences

DF_9703795
9-Granite

HoloLense: using multiple sequences

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!

1 ACCEPTED SOLUTION

Accepted Solutions
sebben
12-Amethyst
(To:DF_9703795)

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.

View solution in original post

1 REPLY 1
sebben
12-Amethyst
(To:DF_9703795)

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.

Top Tags