LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List of sub-vi called by a vi

Solved!
Go to solution

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

Message 1 of 10
(5,461 Views)

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.

0 Kudos
Message 2 of 10
(5,444 Views)

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?

0 Kudos
Message 3 of 10
(5,437 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(5,422 Views)

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

0 Kudos
Message 5 of 10
(5,412 Views)
Solution
Accepted by LucD

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 10
(5,405 Views)

Thank you very much, I should have thought I could do like that. I'm a bit tired.

Than you again

0 Kudos
Message 7 of 10
(5,399 Views)

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.

Visualize the Solution

CLA

LabVIEW, LabVIEW FPGA
Message 8 of 10
(5,385 Views)

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!

0 Kudos
Message 9 of 10
(5,377 Views)

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/

 

0 Kudos
Message 10 of 10
(4,871 Views)