Skip to main content
1-Visitor
April 11, 2017
Solved

Set Thingworx Platform property value from Thingworx AR (Vuforia) Experience

  • April 11, 2017
  • 1 reply
  • 6747 views

Hi Experts -

I am looking for some help related to Thingworx Studio. I am able to pull property value from Thingworx and display within AR experience. But I am trying to update the value of a property of my Thing in Thingworx platform from my AR experience. Basically, like a toggle button within the (Vuforia) AR experience. On pressing the toggle button, I would like to update a property of my Thing. Is this even possible? Any help is highly appreciated.

Thanks,

Mubarak

Message was edited by: Sushant Pandey moved thread to ThingWorx Studio

Best answer by ankigupta

Hi Mubarak Ali​,

I tested the scenario on my instance and it worked fine on my instance.

For Authentication issue please check the following Post: Live Data Preview

Details about my use Case.

I created a New Property (NewTestProperty) in the Car1 Thing.

Then I created a Service with a Text input parameter (Test) and added code to update the Property:

me.NewTestProperty=Test;

Saved it. In ThingWorx Studio:

I added TextInput Widget and a Button widget.

Then I added my ThingWorx custom Service in External data and Binded Text property of TextInput Widget to Parameter of my Custom Service.

I also bound the click event of Button to Custom Service so that I can call it on button click.

In Preview; I entered the Text and clicked the Button and the Text showed in ThingWorx Property.

I hope it helps.

1 reply

5-Regular Member
April 11, 2017

Hi Mubarak Ali​,

You can try to use the update service like UpdatePropertyValue from ThingWorx and pass the widget output as parameter to that Service.

You will have to call this service to update the Data in ThingWorx.

If I remember correctly; I had tried this sometime back and it worked.

Do let me know if it doesn't work for you; I can try it again on my side.

Thanks,

Ankit Gupta

1-Visitor
April 11, 2017

Hi Ankit. Thanks for your response. I added UpdatePropertyValues from my Thing to my AR experience. Then I added a toggle button and binded the pressed event of that toggle button to UpdatePropertyValues service. And then I added the following under the values (under Parameter) under UpdatePropertyValues service.

app.mdl['FactoryThing1'].data.parameter['LED1_Disp_Status'] = "XYZ"

I was expecting the UpdatePropertyValues service to update the value of my property 'LED1_Disp_Status' to 'XYZ'. But I don't see the values getting updated in Thingworx IoT platform. It seems I am doing something wrong. I have also attached a screen shot. Appreciate your help.

Thanks,

Mubarak