Skip to main content
1-Visitor
February 21, 2021
Solved

Get scanned ThinkMark ID Value

  • February 21, 2021
  • 1 reply
  • 5165 views

Hi,

 

How can I get the value of a scanned ThingMark in vuforia, I want to get the value of a scanned value - meaning the id on a printed thingmark not the id on studio.

 

I have been trying to use "setupTrackingEventsCommand" function but I did not succeed.

 

 

thanks in  advance.

Best answer by sebben

Hi,

 

maybe you can do it like this:

$scope.$on("trackingacquired",function (evt, data){
 $scope.view.wdg['label-1']['text'] = data;
 }
);

 

1 reply

14-Alexandrite
February 22, 2021

Hi,

 

you can get the ThingMark Id with:

 

$scope.view.wdg["thingMark-1"].markerId;

 

Just use this in a function and call it from the Tracking Acquired eventof your ThingMark.

 

Note that in preview it won't show anything unless you enter your ThingMark Id in the ThingMark property of your ThingMark. On a device you don't have to this.

MaF1-VisitorAuthor
1-Visitor
February 22, 2021

Thank you for reply.

I tried the solution but it does not yield the desired results:

 

What I want is to get the value of a scanned thingmark- meaning the id of a printed thingmark not the id on studio.

 

When I scan I want the value of a printed thingmark's ID if on paper I have ID 123:1 and I scan I want to get that value.

Hope the above makes sense.

On a barcode scanner we use me.scannedValue which give the currently scanned I want something similar for a thingmark.

 

Thank you.

 

14-Alexandrite
February 22, 2021

Hi,

 

can you explain how exactly you tried the solution?

I am calling this function from the Tracking Acquired event of the ThingMark and it shows the ID in the label (Not in preview but on the device):

$scope.showId = function(){
 $scope.view.wdg["label-1"].text = $scope.view.wdg["thingMark-1"]['markerId'];
}