Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
Hello,
I am trying to use the following code to set a sequence when a model is clicked on, however the .pvi fails to load each time:
var seq_list =["Exhaust-filters","EXPLODE-ALL","Figure 1","Raise-Pump"];
$scope.setSequence = function(val)
{ $scope.setWidgetProp('pump', 'sequence', "app\resources\Uploaded\SV300B_High\l-Creo 3D - "+seq_list[val-1]+".pvi");
/*"app/resources/Uploaded/SV300B_High/I-Creo 3D - "+seq_list[val-1]+".pvi");*/
$scope.$applyAsync();
console.log(val-1);
};
For each model I have a different JS command (i.e. setSequence(1); setSequence(2); setSequence(3) etc.)
The error I am getting is "pump failed to load pvi [insert pvi here]" each time I click on a model (please see attached JPG)
Any insight or ideas would be really appreciated!
Thank you,
Wes
Solved! Go to Solution.
Hi @Wes_Tomer,
I know that this code what you mention should work. Therefore I think the problem is in the syntax of your path.
If I look on the picture I see that the string does not contain any path separators. So believe you have to replace the "\" by "/" ( e.g. \r is missing – on your picture - you can also try \\ but I think / is better ) and to print it to console and to check more accurately if there is pvi file on the specified location.
Hi @Wes_Tomer,
I know that this code what you mention should work. Therefore I think the problem is in the syntax of your path.
If I look on the picture I see that the string does not contain any path separators. So believe you have to replace the "\" by "/" ( e.g. \r is missing – on your picture - you can also try \\ but I think / is better ) and to print it to console and to check more accurately if there is pvi file on the specified location.