Skip to main content
1-Visitor
January 30, 2019
Solved

Get Thing Template implemented Thingshapes service

  • January 30, 2019
  • 6 replies
  • 4307 views

Hi,

is there a service that will return a list of thingshapes implemented by a thing template (or thing derived from the thing template). Thought there would be as they are displayed in the composer, but can't find it.

 

Also looking for a service similar to GetServiceDefinitions() that will return the 'Category' parameter. That way I can filter the results so that I don't get all the services inherited from the base templates.

 

Thanks in advance.

K

 

Best answer by mnarang

// result: INFOTABLE dataShape: "EntityList"
var result = me.GetImplementedShapes();

 

GetImplementedShapes will give you the list of implemented shapes on entity .

 

There is one more for getting the implemented ThingTemplate 

 

var result = me.GetThingTemplate(); 

 

Thanks ,

Mukul Narang 

6 replies

mnarang5-Regular MemberAnswer
5-Regular Member
January 30, 2019

// result: INFOTABLE dataShape: "EntityList"
var result = me.GetImplementedShapes();

 

GetImplementedShapes will give you the list of implemented shapes on entity .

 

There is one more for getting the implemented ThingTemplate 

 

var result = me.GetThingTemplate(); 

 

Thanks ,

Mukul Narang 

khayes11-VisitorAuthor
1-Visitor
January 30, 2019

Hi Mukul,

thanks for that, it is what I was looking for.

K

 

1-Visitor
January 30, 2019

For the GetServiceDefinitions question it doesn't returns the Category, but you can filter by Category listing only the ones of the given Category ( if you know it in advance ).