Best practices and opinions about templtaes?

Let me say first off that as I have been using the software, I see more and more usefulness out of using templates. I used to think that I should only use templates when it is something that is used everywhere, but I have started to shift to using templates for more and more objects because of one important reason. Reusability. I can take a simple numeric display for example and replicate it across and entire system. And when the owner wants to add some special function to this object. No problem! Let me just pull up the template definition and I'm done within seconds.

Anyways here is my feedback:

I must admit, it is very rare that I use template parameters as outputs. That would involve doing some scripting inside of your template to pass values which I have always been wary off. Maybe ask the designer of the template why they need this output parameter in the first place since it's not really directly supported by templates in Vision.

Not sure what you mean by this? They are hidden unless you go digging into the template instance with scripting...

You may find this post helpful to answer your question. To UDT or not to UDT. That is the question

100% agree! My philosophy with templates is to make them as simple as possible so they have the most use cases. I would rather group four templates together to form a 'unit' than to have all four templates crammed into one for simplicity and reuse potential.

To me, a well designed template will use either a bound property, like an open status for a valve, or a tag path, like a command boolean to accomplish its task. It sounds like you are using templates to do something that would be better suited for a customized popup window.

Generally yes. Most of the time objects within the template will be bound either to custom properties on the root container or the template parameters themselves.

I hope this is helpful. As with anything, good template design is an acquired skill. For me personally, I try to make mine as simple as possible. The less amount of scripting the better. :+1:

1 Like