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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

how to stop a sequnece and the deactivate that sequnce and the show the bom.

manojpandey
12-Amethyst

how to stop a sequnece and the deactivate that sequnce and the show the bom.

 I am playing sequence on one button ,after playing  if i am switching to another button to show my bom at that time my sequence model is still showing .

 

i want to deactivate the sequnce . 

2 REPLIES 2
sarora
5-Regular Member
(To:manojpandey)

You can use a timeout function for that sequence. Below is a sample code:-

$scope.sequence1 = function() {
  $scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D - ShoulderReplacement.pvi';
    $timeout(function() {
      twx.app.fn.triggerWidgetService('model-1', 'playAll');
    }, 2000);
  };
$scope.$watch('app.params.foo', function(val) {
  if (val === 'true' || val === true) { 
   $timeout(function() {
      $scope.sequence1();
    }, 2000);
  } else {
    $timeout(function() {
      $scope.sequencestop();
     }, 2000);
  }
});
$scope.sequencestop = function() {
  $scope.view.wdg['model-1']['sequence'] = 'l-Creo 3D - ShoulderReplacement.pvi';
    $timeout(function() {
      twx.app.fn.triggerWidgetService('model-1', 'stop');
    }, 2000);
  };

manojpandey
12-Amethyst
(To:sarora)

as i do not have a coder background so understanding the code was an issue ,

 

I have applied this code but it didnt worked .

 

my problem is -

 

after playing the sequence when i switch to bom the parts which are created as model item gets hide but my model does not get hide(in the model there are parts which i do not want to show in my bom). 

Top Tags