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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

How can I get the ThingTemplate implemented by a Thing?

EntuizerTech
1-Newbie

How can I get the ThingTemplate implemented by a Thing?

I have this service to get the ThingTemplate implemented by a set of Things wich implements different Thing Templates.

The code:

result = Things[ThreeInput].GetImplementedThingTemplates().toInfoTable();

But when testing it, it throws the following error:

Does anybody knows what is the solution to this?

Thanks on advance.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi Josue,

Alternatively to GetThingTemplate() which returns an infotable of just one row, you can also use .thingTemplate Thing's property

Best Regards,

Carles.

View solution in original post

3 REPLIES 3
AnnaAn
13-Aquamarine
(To:EntuizerTech)

Josue Serrano​,

A Thing could only extends one Thing Template but it could implement more than one Thing Shapes, so in your case, if you want to get the Thing Template a Thing extends/implements, you should do with:

result = Things["TestThing"].GetThingTemplate();

If you want to get the Thing Shape list a Thing Implemented, you need do with:

var result = Things["TestThing"].GetImplementedShapes();

Hope this helps,

Br,

Anna

Hi Josue,

Alternatively to GetThingTemplate() which returns an infotable of just one row, you can also use .thingTemplate Thing's property

Best Regards,

Carles.

Such a noob mistake. I Think I have to go back to study Thingworx basics.

I appreciate the answer.

Top Tags