Skip to main content
1-Visitor
August 2, 2018
Question

How can we read the thingname of thing from a thingshape which is attached to it using eclipse?

  • August 2, 2018
  • 4 replies
  • 2912 views

I want to get the thingname for a thing through a thingshape attached to it. using eclipse I can't fetch the particular thing name for getting the properties of the thing.

 for example in thingworx we use "me.name"  to fetch the thingname, what will be the suitable alternative for that in java eclipse.

 

thanks in advance.

 

4 replies

5-Regular Member
August 6, 2018

Hi Sugmar,

 

In thingworx for ThingShapes and templates a use the services:

 

- GetIncomingDependencies

- GetOutgoingDependencies

 

To list the child and the parents.

 

I believe is just call this services in eclipse.

 

Thanks,

Vinicius.

1-Visitor
August 7, 2018

Hai Xavier.

                  I tried this one, it is listing the parent and child relationships as you mentioned. but my requirement is to read the thingname through the thingshape service which is attached to it. 

 

generally in javascript we use "me.name". i just need the equivalent code of this one in java .

 

thanks and regards

Sugumar  

5-Regular Member
August 7, 2018

StringPrimitive name =
(StringPrimitive)this.getPropertyValue("name");

 

Does this work?