Guest User

Untitled

a guest
May 26th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.18 KB | None | 0 0
  1. var sequencePlayed = false;
  2.  
  3. $scope.resetSequence = function() {
  4. angular.element(document.getElementById('__studioIDofModelWidget__')).scope().reset();
  5. $scope.view.wdg['toggleButton-3']['pressed'] = false;
  6. $scope.view.wdg['toggleButton-2']['pressed'] = false;
  7. $scope.view.wdg['toggleButton-1']['pressed'] = false;
  8. sequencePlayed = false;
  9. setTimeout(function(){
  10. $scope.view.wdg['__studioIDofModelWidget__']['sequence'] = '';
  11. $scope.$applyAsync();
  12. },0);
  13. }
  14.  
  15. // plays blade removal sequence
  16. $scope.blades = function() {
  17. if(sequencePlayed) {
  18. $scope.resetSequence();
  19. }
  20. else {
  21. $scope.playseq('__nameOfPVI__');//ex 'l-Creo 3D - blade_5Fchange.pvi' this can be found by opening of the pvz
  22. }
  23.  
  24. }
  25.  
  26. $scope.exhaust = function() {
  27. if(sequencePlayed) {
  28. $scope.resetSequence();
  29. }
  30. else {
  31. $scope.playseq('__nameOFPVI__');//ex 'l-Creo 3D - Exhaust.pvi' this can be found by opening of the pvz
  32. }
  33. }
  34.  
  35. $scope.playseq = function(name) {
  36. sequencePlayed = true;
  37. $scope.view.wdg['__studioIDofModelWidget__']['sequence'] = name;
  38. $scope.$applyAsync();
  39.  
  40. $timeout(function() {
  41. $scope.$broadcast('app.view["Home"].wdg["__studioIDofModelWidget__"].svc.playAll');
  42. }, 800);
  43. }
Add Comment
Please, Sign In to add comment