LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I find the instances of a subvi programmatically

When one subvi appears for several times in the blockdiagramm, who can I get a ID number for every instance of the subvi?
When I right-click on the subvi -> "Find all instances" then I get how often the subvi appears on the blockdiagramm but i need the information programmatically.

Thanks for helping!

Mathias
0 Kudos
Message 1 of 6
(3,234 Views)
You can use the VI "DAsst_mxwScript_Get SubVI Refnums.vi", located at:

LabVIEW 7.0\vi.lib\express\DAQmx\DAQAssistantConfig\ConfigVIs.llb

This VI returns SubVI references of all subVIs in a VI. I have attached a VI that will list the names of all VIs that call a subVI and number of times it is called by each VI.

-Jim
Message 2 of 6
(3,234 Views)
Thanks for the example but is it possible to get the references and item numbers of the subVI as well with LabVIEW 6.1 without an installed DAQ device??

Mathias
0 Kudos
Message 3 of 6
(3,234 Views)
LabVIEW won't let you save "DAsst_mxwScript_Get SubVI Refnums.vi" for a previous version of LabVIEW since its a "toolkit vi" if you try to do this with the "Save with Options" feature. However, LabVIEW *will* let you invoke the "Save for Previous" VI server method on toolkit VIs 🙂

Attached are the VIs saved in LV 6.1

-Jim
0 Kudos
Message 4 of 6
(3,234 Views)

Hi,

 

I'm trying to use this tool. As soon as I execute it, I get an error. It seems to throw an error when hitting a password protected VI. The post is 10 years old, is there any more recent solution to find all VI's instances programmatically?

 

Regards,

 

Nitrof

0 Kudos
Message 5 of 6
(2,781 Views)

Solution:

 

C:\Program Files (x86)\National Instruments\LabVIEW 2012\vi.lib\Utility\traverseref.llb\Traverse for GObjects.vi

 

  :Smiley Embarassed

Message 6 of 6
(2,773 Views)