Skip to main content
Jun 1, 2021 10:16 AM UTC
Solved

Adding a ThingShape to a ThingTemplate which is non-editable

Hi All,

 

I have a query related to adding a thing shape dynamically onto a thing template but the issue is that the thing template, as well as the shape, is part of an extension, which means they are non-editable. By attaching the shape to the template a new functionality will be achieved by the things created under that template.

 

Please let me know if there is a way to attach a shape to a template dynamically (non-editable template)

 

Thanks in Advance!

slangleyAnswer
Jun 23, 2021 7:30 PM UTC

Hi @SrijithKrish 

 

You could create 2 templates.  One would be just the base template without the shape, and the 2nd one would be a new template that implements the 1st template and the shape.  You could actually eliminate the shape and just use 1 template to implement the 2nd template and make all entities non-editable.  These scenarios would prevent the need to dynamically attach the shape.

 

Regards.

 

--Sharon

7 replies

Jun 1, 2021 11:34 AM UTC

@SrijithKrish :You can try packaging entities as editable in your custom extension so that templates and shapes can be edited. Please check following article:

https://www.ptc.com/en/support/article/CS323766

Jun 1, 2021 1:00 PM UTC

@abjain actually I do not require the entities to be editable. The entities should be non-editable themselves because no user should be able to edit within these entities. 

 

If I was to make the entities editable I will have to do it manually for all the entities separately and I am having more than 100 templates.

Jun 1, 2021 1:04 PM UTC

@abjain so here is it mentioning making an entity editable after importing as an extension. If that is the case will I be able to change the entity to editable and attach the shape and then turn it back to non-editable?

Jul 13, 2021 3:02 PM UTC

Hi @SrijithKrish

 

If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon