Skip to main content
1-Visitor
February 13, 2020
Question

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

  • February 13, 2020
  • 1 reply
  • 2111 views

 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 . 

1 reply

5-Regular Member
February 13, 2020

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);
  };

1-Visitor
February 17, 2020

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).