Skip to main content
1-Visitor
January 10, 2018
Solved

How to re scan a Thingmark automatically adding JS code , not pressing the scan button

  • January 10, 2018
  • 1 reply
  • 4866 views

Hi everybody


We have an important issue with a client , he wants to put on machines some thingmarks , each thingmark with an specific AR experience , for our client (Quality inspector) is so complicated scan and scan again each thingmark , he needs something which let him do it more dynamic because the company  has thousends of machines to be monitored , then it is not so practical the current configuration to scan each thingmark.

We would like to know what is the best path to solve this issue , how should we modify something in ThingWorx Studio, ThingWorx, ThingWorx View? I got the following code but it is not working , I would like to know what I am doing wrong .


app.fn.navigateToScanMode();

$scope.yourfunction = function() {

app.fn.navigateToScanMode();

}



Thank you in advance

Regards

Best answer by mwassmann

yes

you may have not seen the correct code :

So your function is incorrect.

its not app.fn ....

its $scope.app.fn...

However loosing the extended tracking functionality is really NOT good!

Martin

1 reply

5-Regular Member
January 11, 2018

Hej Elias,

not sure about the customer case - and if you need support on that?

One way to do it is the following:

that works - just validated it.

However, if the use case is different - maybe it could be worth to jump from one machine to the next by jumping to another experience directly?  --

Do you use ThingTemplate based experiences by the way?

Martin

efraga1-VisitorAuthor
1-Visitor
January 11, 2018

Hi Martin ,

thank you very much for your help , maybe I was not so clear enough , let me explain you  what I want to do , I want to load so many AR experiences automatically not pressing the Scan button , for example if am NOT focusing the firts thingmark or if I lose the thingmark I would like to add a function to activate the Scan button automatically , not pressing the button js_issue.jpg

5-Regular Member
January 12, 2018

Well, I'm not sure if that is a reasonable way to do things.I wouldn't recommend it. You will loose the "real" AR capabilities with that specification.

With the way described above you would not be needed to use the scan button anymore.

I would most probably implement that function automatically, when the work is done / and being validated by the user (status written back into another system, via thingworx).

However if you really want to do it the way it was specified:

If you loose the thingmark, the extended tracking will jump in --> if you disable it, you won't be able to work without having the thingmark in sight.

(you can disable it with a checkmark inside studio).

Disable the extended tracking. Then there is a function called "tracking lost" -> you can use that to trigger your scan function and you will have your wanted behavior

though I dont recommend to do things like that.

Martin