10-25-2010 07:09 AM
Hello,
I would like to know how to generate the list of VI contained in a "main" VI? I need to have an comprehensive list of the sources of my software.
Thank you
Solved! Go to Solution.
10-25-2010 07:55 AM
I do not have LabVIEW installed on this PC, so I cannot confirm what I am about to describe.
You should be able to get a list of references for objects on the block diagram. From that list, you can determine the reference type. Using the reference type (or rather what type of object the reference is for) you can select the references that are for VI's. With that reference, you can obtain the VI name and it's path.
Now, if it's a main VI, it is much simpler as you can get a list of VI's loaded into memory, using a property node.
10-25-2010 08:07 AM
If I well understand what you say: it must be possible toget this list through a property node. So I have to add some code in my diagram in order to put this list in a text file, for example?
If yes, my problem is that the program (I want the list of sub-vi from) is not supposed to work on my computer (the only one I have with labview installed on) because it was developped on a computer, that I sold to my client, with several boards I don't have on mine. So if I lunch the soft on my computer, it's going to crash.
Wouldn't it be conflicting with you means?
10-25-2010 08:20 AM
The "All VIs in Memory" property will return a list of refs to all VIs in memory. You can get the name and path of each sub-VI by running those refs through a loop with the right property nodes to get the name and path.
Ben
10-25-2010 09:06 AM
Thank you very much for your help.
But is there anyway not to run the VI to get this list? I've found an option in the menu bar of the VI that give the graphic hierarchy of the VI, is there any way to export this hierarchy through a text file because I CAN'T run the soft
10-25-2010 09:14 AM
Open but don't run the VI.
THen create a VI to do what I described. Provided there are dynamic VI loads (and no LVOOP) that should work the same.
Ben
10-25-2010 09:18 AM
Thank you very much, I should have thought I could do like that. I'm a bit tired.
Than you again
10-25-2010 09:36 AM
Assuming you have your Main.vi in a project.
Open the main.lvproj ( just an xml file) with a text editor and voila - you get a list of all of the VIs including dependencies.
10-25-2010 09:46 AM
Amazing!
I was diving into a VI building my list, assuming I haven't practiced Labview for several weeks and I have to get this list by tonight, it was a bit dark.
But your solution, so obvious, saved my day! Besides your "voilà" came right to my french heart.
Merci!
11-08-2013 06:58 AM
It's a bit late to answer here, but there is a VI Method called "Get VI Dependencies" which you can parametrize to yield the desired VI names and paths. In case you only need the VIs you wrote yourself, you can filter the entire hierarchy for the paths that (do not) interest you.
http://zone.ni.com/reference/en-XX/help/371361H-01/lvprop/vi_get_vi_dependencies/