03-24-2021 12:42 PM
I am trying to create a script to insert code in a VI. The code to be inserted looks like this:
Manually I can do this by putting this code in a subVI, right-clicking on the wire in the VI to be edited and select Insert -> -> Select a VI... , then right-clicking on the new subVI and selecting "Replace with subVI Contents". But apparently there's no way to script that.
I can't leave it as a subVI because the actual class is not always the same. I can't make it as a malleable because class unbundlers are not allowed in malleables.
So far, the cleanest way I can think of is to have this in a template:
Copy and paste it into the target VI, then write a bunch of script to hook it up and then remove the sequence.
Can anyone think of a better way?
Solved! Go to Solution.
03-26-2021 04:36 AM
SubVI has a 'inline' method that does this.
The name was probable created long before VI's could actually be inlined.
03-26-2021 08:25 AM
wiebe@CARYA wrote:
SubVI has a 'inline' method that does this.
The name was probable created long before VI's could actually be inlined.
Thank you. Part of my code went from this:
to this: