Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Hi, i created a Three of sequence.
but ThingWorx studio can select one sequence
I want to change a sequence via button or list
how can i change sequence at running app
Thank you
Solved! Go to Solution.
Hi,
Here is my suggestion:
Add the following JavaScript code:
$scope.FirstSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%201.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) }; $scope.SecondSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%202.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) }; $scope.ThirdSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%203.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) };
FirstSequence();
$timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400)
Best of luck,
Ricardo
Hi,
Here is my suggestion:
Add the following JavaScript code:
$scope.FirstSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%201.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) }; $scope.SecondSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%202.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) }; $scope.ThirdSequence = function() { $scope.view.wdg['model-1']['sequence'] = 'l-Creo%203D%20-%20Figure%203.pvi'; $scope.$applyAsync(); $timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400) };
FirstSequence();
$timeout(function() { $scope.$broadcast('app.view["model-1"].svc.playAll') }, 400)
Best of luck,
Ricardo
Any Examble project is there for reference.