cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Participant

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

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

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions

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

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

5 REPLIES 5

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

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

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

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

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

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

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

Hi Martin ,

I undertand your point perfectely but a client wants it , We are trying to help him , he wants to be able to scan different machines automatically but not pressing the scan button so many times , something like that  , he will be walking on the production line like that Example.jpg

He wants to be able to use Hololens or a Table to be walking on the production line and been checking  gauges with information on real time about the most important parameters for each machine . He said that it is much less practical if he has to press the "Scan button" for each thingmark , I dont know if I was clear enough.

Now I do not how should I use "tracking lose" to trigger my Scan function ,

in "Tracking Lost" event  I added the following

and on Home.js I added the following to call the function but it is not working ,

I test the AR experience but there are not changes and also I uncheck this option too

Do you know what I am doing on a wrong way?

Than you very much for your help

Regards

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

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