Vuforia View app crashes when the property value changes
Hi,
I would like to play a certain sequence, which i already created in my Creo Illustrate model, when the bool value changes in the PLC.
After entering the JS code I have the problem that the app sporadically crashes.
But usually it happens when the value to be monitored changes.
I tried to play the sequence by using the watch function
$scope.PlaySequence = function ()
{
$timeout (function() {
$scope.app.view.Startseite.wdg["model-1"].currentStep = 17;
$timeout(function () {
$scope.$root.$broadcast('app.view["Startseite"].wdg["model-1"].svc.play');},250);},250);
$scope.$applyAsync(()=>{angular.element(document.getElementById('model-1')).scope().reset();});
return;
};
$scope.$watch(function(scope)
{
return $scope.app.mdl.HoRe_ALL.properties.TestBool
},
function ()
{
$scope.PlaySequence();
}
);
Can someone tell me what I'm doing wrong with this function?
Yours sincerely
Marco

