Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
Hi,
I have multiple views in a project.
Solved! Go to Solution.
That should not be possible unless you also kept the first solution. ( But it should wait until the step is completed anyway)
To rewind a step just add a button and connect the click event with the rewind service of the model.
If you want to make sure the last step is finished before the user can change the view you can change condition of the if statement:
if($scope.view.wdg["model-1"].currentStep == $scope.view.wdg["model-1"].steps && $scope.view.wdg["model-1"].playing == false)
If it still does not work can you please share an example how you are trying to do it. Thanks.
Hi,
you can use this function:
$scope.$on('stepcompleted', function(evt, arg1, arg2, arg3) {
if($scope.view.wdg["model-1"].currentStep == $scope.view.wdg["model-1"].steps){
$scope.navigate("View2");
}
});
Make sure you change the model and view name according to your experience.
Hi, thank you for your response.
i've tried it, and it works.
But i've concern regarding swipe left gesture. Is it possible to navigate view if the last step has finished playing without user clicking on rewind button and then user swipe left?
You can use the swipe left gesture. You need to write a function like this:
$scope.navigateToView = function() {
if($scope.view.wdg["model-1"].currentStep == $scope.view.wdg["model-1"].steps){
$scope.navigate("View2");
}
}
Next, click the JS icon next to the swipeleft application event, and enter the following in the expression box: viewCtrl.navigateToView();
I've tried the solution that you gave. But it automatically change to next view without playing the last step.
I want the last step being played first, and user can rewind the last step by clicking on the button. After last step finished playing, user swipe left to navigate to next view.
That should not be possible unless you also kept the first solution. ( But it should wait until the step is completed anyway)
To rewind a step just add a button and connect the click event with the rewind service of the model.
If you want to make sure the last step is finished before the user can change the view you can change condition of the if statement:
if($scope.view.wdg["model-1"].currentStep == $scope.view.wdg["model-1"].steps && $scope.view.wdg["model-1"].playing == false)
If it still does not work can you please share an example how you are trying to do it. Thanks.
Thank you for your help.
I've tried the script to navigate view. It's working on the preview mode, but when I test it with Hololens, its not working.
How can I solve this issue?
It works for me.
Make sure you perform the gestures right like is written here:
If it still does not work, could you please share an example. Thanks.