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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Get scanned ThinkMark ID Value

MaF
8-Gravel
8-Gravel

Get scanned ThinkMark ID Value

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.

1 ACCEPTED SOLUTION

Accepted Solutions
sebben
12-Amethyst
(To:MaF)

Hi,

 

maybe you can do it like this:

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

 

View solution in original post

9 REPLIES 9
sebben
12-Amethyst
(To:MaF)

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.

MaF
8-Gravel
8-Gravel
(To:sebben)

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.

 

sebben
12-Amethyst
(To:MaF)

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'];
}

 

MaF
8-Gravel
8-Gravel
(To:sebben)

I did it exactly like yours but it does not give me the value of a thingmark's id printed it give a value a an ID specified in Studio for the project. As explained earlier for a barcode scanner you can use me.scannedValue on valueacquired to get the scanned value from a camera feed, I want something similar.

 

example:

printed 2 thinkmark on paper (id1 = 123:1  and id2= 123:2)

when I scan id1 I want to get 123:1 and when I scan id2 I want 123:2 displayed on the label-1.

MaF
8-Gravel
8-Gravel
(To:MaF)

Hi all,

 

Any help on this will be greatly appreciated.

 

example:

printed 2 thinkmark on paper (id1 = 123:1  and id2= 123:2)

when I scan id1 I want to get 123:1 and when I scan id2 I want 123:2 displayed on the label-1.

sebben
12-Amethyst
(To:MaF)

Hi,

 

maybe you can do it like this:

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

 

MaF
8-Gravel
8-Gravel
(To:sebben)

Thank you, just a brief one, how did you know what and how many perimeters the trackingacquired required.

Where shouls one look to understand the internal function because there is no documentation for developers?

 

Thank you.

SteveGhee
10-Marble
(To:MaF)

A tutorial is being created that will help show many features of the tracking capabilities, including handling multiple product instances and configurations using different thingmarks.  Hopefully something to share in a couple of weeks, once its been through some internal testing.

NP_10149671
7-Bedrock
(To:MaF)

Hi @MaF ,

I am beginner in vuforia studio. Can you please tell me where should I find this thingmark ID? Or If anyone knows please tell me.  Here I attach file please check this.

Top Tags