LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to retrieve "This VI's SubVIs" programmatically?

Solved!
Go to solution

The View >> Browse Relationships >> This VI's SubVIs menu option reveals the names and icons of all subVIs used in a given VI.

 

Is it possible to retrieve this information programmatically?

 

1.png

 

0 Kudos
Message 1 of 7
(607 Views)
Solution
Accepted by topic author Petru_Tarabuta

Hi Petru,

 

Yes, but you need to enable VI Scripting:

Get This VI's SubVI Names and Icons.png

 

Regards,

Raphaël.

Message 2 of 7
(587 Views)

You might try turning on VI scripting nodes under tools\options\vi server\VI Scripting

Screenshot 2026-02-28 at 4.01.37 PM.png

It looks like there may be property nodes that return references to subvis found on a VIs block diagram

Screenshot 2026-02-28 at 3.59.36 PM.png

 

 
 
Message 3 of 7
(582 Views)

@gt8860a wrote:

It looks like there may be property nodes that return references to subvis found on a VIs block diagram

Screenshot 2026-02-28 at 3.59.36 PM.png


Property "SubVIs[]" of class "Diagram" only gives SubVIs at the same level as the diagram, it does not get SubVIs in nested subdiagrams recursively.

Message 4 of 7
(576 Views)

Thanks both!

0 Kudos
Message 5 of 7
(535 Views)

You can also use "Get VI Dependencies".  No scripting needed => works in exe.

Get VI Dependencies.png

 

 

George Zou
Message 6 of 7
(468 Views)

To find common SubVIs of given multiple VIs, in addition to call the above VI in a FOR loop, we can also create a project programmatically and add all VIs to it.  And then retrieve dependencies from the project.  Save the trouble to remove duplicates.

A slow motion video attached.

Find SubVIs.vi.png

George Zou
Download All
Message 7 of 7
(329 Views)