LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic VI description

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.

0 Kudos
Message 1 of 4
(3,183 Views)

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.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 4
(3,168 Views)

You can create a VI template. 

 

https://www.ni.com/docs/en-US/bundle/labview/page/creating-vis-from-templates-and-sample-projects.ht...

 

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

 

Message 3 of 4
(3,130 Views)

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... 🙂

---
CLA
Message 4 of 4
(3,120 Views)