LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create list of VIs at Runtime

Dr Gray wrote " Get VI Dependencies method.  "

 

So you have to use a invoke node and not a property node.

 

Callees used to be a property.

 

Reminds of one of those old Helen Kellar jokes.

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 11 of 17
(847 Views)

Helen Keller for sure.  Am I missing it?

 

getvideps.png

0 Kudos
Message 12 of 17
(843 Views)

Get VI Dependencies.png

0 Kudos
Message 13 of 17
(840 Views)

The first propertry I mentioned was a property of the application.

 

The mehtod you are after is a method of the VI so (look at the image above) you need tostart with a VI ref to find that method.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 17
(837 Views)

Thanks for helping, people, but this still doesn't show how many of each block are used. Is there a way to do that?

0 Kudos
Message 15 of 17
(831 Views)

Search this site for "scripting" to get started.

 

Scripting is LV functionality that will allow you to prgramatically interact with the diagram of a VI. You should be able traverse the diagram and inspect each node to get at how many of each on the diagram.

 

Warning: "If I take one more step I will have gone further than I have ever gone before" (Master Samwise Gangee, Fellowship of the Ring).

 

I stopped playing with scripting long before it became legal and public so I will not be able to guide a long your journey.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 16 of 17
(822 Views)

You have a couple of options, and I believe both will require the scripting API to be turned on:

 

  1. You can start at your top level VI and recursively find out what subVIs it and its subVIs have.  At each subVI, find out what the actual VI name is and build up your list that way.  You can use the initial list of what is in memory to start your structure of how many of what is in memory.  Start with the methods above to get a list of VIs used by the calling VI.  Use the Block Diagram property to get a reference to the block diagram.  Use the Traverse for GObjects.vi to find the subVIs on the block diagram.  For each subVI, do the same, adding to your list.
  2. Use the methods above to find out what is used.  At each VI used, use the Caller's Names property to find out how many VIs are calling it.  This will not tell you how many times it is called in a single VI (but the previous method will).

Given your original question, I think 1. will work better for you.  If you have further questions, keep asking.  VI server calls / scripting can be complex and confusing.

0 Kudos
Message 17 of 17
(815 Views)