AnswerHub Upload Issue
Our AnswerHub community currently has a bug that prevents you from attaching your model or other files to your questions. AnswerHub is aware of this issue and they are working on a fix. Until we receive their patch, you can upload your models and other files to FlexSim's file share site. Include the file name in your question so that we know which upload to reference.


mike E avatar image
mike E asked anthony.johnson edited

Template inheritance and User Libraries

I have a few questions about template inheritance in FlexSim 2021 Update 2:

If you create a template object, can it be put into the user library?

If so, if you edit the properties of the library object are they automatically inherited by the instances in the model?

Can the parent object itself be a child of another object such that some of the inheritance cascades from the grandparent... all whilst in the library?

If not, what do you envisage will be the methodology (e.g. having a set of templates in the model which are not attached and represent an internal “template library” within the model).

Other (please specify)
templatesuser libraries
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Hi @mike E, was Jason Lightfoot's answer helpful? If so, please click the red "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered anthony.johnson commented

Hi Mike!

I think the answer will be 'yes' but with possibly with some caveats if the developers haven't yet embraced the idea that the templates could be stored outside the traditional model areas.

Yes the object template can be in a user library, but since you want that template relationship to persist with the model, you may want to move the user library into the model when you save it (use the modellibraries triggers).

Yes, then editing the user library objects properties will propogate to the inherited instances, if they're edited in an Ortho view or GUIs or directly via the setProperty method.

Yes cascading inheritance will work.

The other question is what if someone gives you a newer library of templates that updates the old ones - that might involve some scripting to transfer the template references over - but should all be possible, even if it's not automatic. As far as I'm aware there's no versioning for such a template/library system yet. @anthony.johnson may know otherwise on that or any of the points you mention here.

· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Any news on the second question? I.e. how to update a model with a newer library of templates?
0 Likes 0 ·

The user library mechanism for templates works through global templates. Template inheritance happens only between objects in your model. It does not happen between an object in your user library and an object in your model. That said, if you make an object in your model into a "Global Template" you can then add the "Global Template" to a user library, through the toolbox. Adding it through the toolbox is different than adding a standard object to your user library. It works more like other tools in the toolbox. When you drop a global template from a user library into an existing model, then if that existing model already has a global template with the same name, it will update the global template object based on the object you are dropping, and, consequently, it will update all of the template instances of that global template. So it's kind of like installing the new object into the model, with all of its new features.

That's the initial design for using templates with user libraries. I do want to get feedback to see how people are using it, and if they are running into any hiccups, so we can improve it over time.

2 Likes 2 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.