02-11-2015 09:54 AM
Since I'm involved in some big projects I wonder if there is an option to automatically add some previously set description in a new VI created in LV? Assume I want to avoid adding my signature and other repeatable significant info in each VI added to project. This seems to be an easy feature but I haven't discovered something like that before.
02-11-2015 10:12 AM
You should be able to do this with VI scripting.
It's also something I know you can do with VI Package Manager - it can add text to the bottom of the description of every VI when it builds the package but this isn't useful for you if you're not building packages.
02-11-2015
02:22 PM
- last edited on
03-14-2024
03:23 PM
by
Content Cleaner
You can create a VI template.
Scripting is not strictly neccesary to update the VI description. You can use basic functions to load a VI into memory, modify the Description by way of a property node, and then save the VI.
https://forums.ni.com/t5/LabVIEW/Programmatically-modifying-a-VI-s-Description/td-p/612300
02-11-2015 02:46 PM - edited 02-11-2015 02:47 PM
Thinking off the top of my head:
1) Use a VI template with the description already set.
2) Use VI scripting.
Using VI scripting, the possibilities are boundless. You could make a QuickDrop plugin that updates the VI Description property of any selected VI in the Quick Drop window, or from the block diagram. You could combine VI scripting with a new lv_new_vi.vi in the resource/plugins folder, which is the VI that runs when you press CTRL-N in LV.
3) Generate an array of references of VIs that you would like to change, in whatever way you wish - e.g. Get VI Dependencies invoke method from a top level VI, returning the paths to each VI, use Open VI Reference in an autoindexing for loop. From each VI's reference, there's a property called 'VI Description' - set that to write and you can feed in your description. You'd then need to save each one too using the Save Instrument invoke mode.
Edit - bah, beaten to it whilst off settling the baby down... 🙂