12-02-2024 08:14 AM
Hello community,
I've having difficulties creating a template that has other vi's inside. An example is attached:
This is based on the JKI state machine and I added some code to build a template for my team that has three files inside. Those needs to be customized each time is used.
If I modify the file extension to be template everytime I open "TemplateMain.vit" and then save then I need to save a rename all these files. Is it a better way to do it?
Solved! Go to Solution.
12-02-2024 08:58 AM
Remove your email from your user name!
12-02-2024 09:00 AM - edited 12-02-2024 09:08 AM
@JorgeAmaral wrote:This is based on the JKI state machine and I added some code to build a template for my team that has three files inside. Those needs to be customized each time is used.
If I modify the file extension to be template everytime I open "TemplateMain.vit" and then save then I need to save a rename all these files. Is it a better way to do it?
Not with templates. Templates is a 25 year old construct that didn't age well.
If the VIs (controls) lived in a class (or library), a "save as" would save all the code in it with it's own name spaced linkage..
12-02-2024 09:55 AM
It's already modified but it's not updating!
12-02-2024 10:02 AM
Hello Wiebe@CARYA,
Thanks for your support.
But the concept of the template is nice (but I didn't used it much) because a collegue from the group doesn't make the mistake of using it like it is on their project. It always forces the user to save it on another location.
Doing a "save as" it's a little bit different.
So, based on your idea I think that I should create a Scripting tool to use these files. What do you think?
12-03-2024 06:00 AM
@JorgeAmaral wrote:So, based on your idea I think that I should create a Scripting tool to use these files. What do you think?
I think educating your colleges might be a better investment of your time.
Using scripting to automate 90% of a job is usually easy, but getting scripting to do something that works 100% can take a lot of time.
Note a tool needs to be (in random order) maintained, stored, distributed, updated, finetuned, debugged and tested.
YMMV, but I usually end up not even using my own tools.