Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
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
Solved! Go to Solution.
// 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
// 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
Hi Mukul,
thanks for that, it is what I was looking for.
K
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 ).
Hi Carles,
thanks for the reply. Basically I am trying to get the service definitions of the services I personally added to a thing template. I don't want those that are inherited. Unfortunately I didn't add a category string when I created them. If I call the service without a category filter I get all the services (including the inherited ones). Is there a quick filter I can use in the category field or will I have to go through each service I wrote and add a category string first?
Thanks again,
K
Hello K,
If it are few services, just go and change the category with the composer, should be a moment. Otherwise you can export ThingTemplate for Source Control and search and remplace category="" to category="yourDesiredCategory" and import back.
Regards,
Carles.
Thank you, very helpful.
K