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

How to use the "click" event of a 3D label in ThingWorx Studio?

SOLVED
Highlighted

How to use the "click" event of a 3D label in ThingWorx Studio?

Hi,

I want to show some labels which on clicking will show other labels. That means if there are two labels Label1 and Label2 then on clicking on Label1, Label2 will be visible. I have written a service which will update a Thing Property value to True/False based on the click. I have bind the Label1 click property to this service. Also the Thing property value is bind to the Label2.

But this is not working. Can anyone please tell me some way to achieve the task?

Thank you...

Regards,

Dipika

Tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

Hi Dipika Sengupta​,

Is there any specific reason to write the service in ThingWorx.

You can directly add following code in ThingWorx Studio to make the 3D label widget visible:

$scope.view.wdg['3DLabel-2']['visible'] = true;

And call the function on click event of 3D label1.

I hope it helps.

6 REPLIES 6

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

Hi Dipika Sengupta​,

Is there any specific reason to write the service in ThingWorx.

You can directly add following code in ThingWorx Studio to make the 3D label widget visible:

$scope.view.wdg['3DLabel-2']['visible'] = true;

And call the function on click event of 3D label1.

I hope it helps.

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

Hi Ankit Gupta

Thank you for the solution. It worked!!

I have another doubt. I have tried the same thing with model-items. I tried the click event of the model-item to show some 3d Label. It is working in the preview but not working while experiencing it from mobile device. Is there any work around?

Thank you...

Regards,

Dipika

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

Hi,

I am having the same issue. in preview the event triggers when clicked but in a touchscreen device it does not. Is there any solution that would also work in ThingWorx View?

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

I managed to get this working. Just tested it once more and it worked.

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

Hi ankigupta,

 

can you help me how to call a function in the click event of the label please?

 

Thank you,

DF

Re: How to use the "click" event of a 3D label in ThingWorx Studio?

if i paste this code into home.js the experience does not start. It just jumps back to the TWX view homescreen on hololens.