Hi,
I sometimes could've used a VIT that maintained its connection to the VI you create from it, in the sense that if you later update the VIT any VI created from it update equivalently. Here I suggest such a "linked VIT", I call it a VI Definition here (.vid?), but it could be named something else if you have a better term. I envision something like this:
Consider a VIT containing code like this (just a small stupid example, often VITs are more complex), except this is a VID:
Then you create a new VI from the VID, and fill in some additional code:
To illustrate which pieces of code comes from the VID, I've dimmed those parts (since they have a couple of special properties I'll explain in a moment):
What you may not do to the objects originating from the VID:
1) You may not delete or replace any of those objects.
2) You may not unwire any originally wired terminal.
3) You may not delete any existing cases from case structures, event structures etc. Special situations arise when a referenced typedef changes for instance.
4) You may not change any control labels (if the VID can identify the original controls by other means you could perhaps be allowed to change their labels?).
5) You may not insert any object onto an existing wire (if this can be done while maintaining the autoupdate functionality from VID to VI then it maybe should be allowed?).
What you may do:
a) You may resize any existing structures, as well as move any objects and wires.
b) You may wire to any originally unwired terminal.
c) You may insert any number of new objects.
d) You may add new cases to case structures etc, and you may reorder cases.
e) You may change structure labels and control captions.
f) What about original free labels?..
What the above makes possible is that if you later change* the VID all the VIs created from it will update as well (when they are loaded into memory and checks their changed .vid file). Only what was changed in the VID will propagate into the VIs, nothing else is changed including the custom code added to each.
You should be able to unlink a created VI from its VID, possibly with a password protection.
What do you think about this?
Cheers,
Steen
* When a VID is changed a lot it's probably not possible to detect 1:1 what was changed when LabVIEW later compares it with each instantiated VI, so some change history inside the VID should probably be maintained to enable LabVIEW scripting the same changes into each instantiated VI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.