LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create list of VIs at Runtime

Hi!

I am working on a Labview simulation project that involves reading and writing values over a network, in place of what would normally run on an embedded platform.  It needs to generate a list of specific Labview blocks in the diagram in order to open the "signal" before running the rest of the program.

 

Anyway, my question is, is there a way to programmatically find the number of specific blocks used in a Labview program before actually executing them?

 

Thanks,

Jimbo

0 Kudos
Message 1 of 17
(2,674 Views)

application poroperty node "All VIs in memory"

 

Cahce the results.

 

open the target.

 

Repeate "all vis in memory"

 

The difference between the two list is a start.

 

If you Vi shares some sub-s with the target, then you can traverse the hiearchy using "Callees" and chance those down.

 

Why do you need this for?

 

Ben

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

Thanks!  This looks very close to what I need.  Unfortunately, this adds all of the VIs that are in memory - including ones that are open but not called in your program.  Is there a way to limit this to just the ones in the block diagram?

 

Furthermore, the most important part of this is to find how many of a specific block are used.  I think this only shows one line per VI.

 

Basically, this is just a little simulation thing that needs to find how many of particular kinds of objects are created in the program and then initializes the objects on the network before the logic of the program itself runs.

0 Kudos
Message 3 of 17
(2,635 Views)

"callees" of the VI in question.

 

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 17
(2,632 Views)

I don't see where callees is located.  Can you help me out with that?

 

Also, does this return how many of these callees/VIs/whatever there are?

0 Kudos
Message 5 of 17
(2,627 Views)

its a property of the Vi itself.

 

You also may want to look into scripting.

 

Ben

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

The Callees property has been replaced by the Get VI Dependencies method.  That is why you cannot find it.

Message 7 of 17
(2,620 Views)

@DFGray wrote:

The Callees property has been replaced by the Get VI Dependencies method.  That is why you cannot find it.


 

"completly correct but totally useless". I don't TRY to give those types of replies but it makes me giggle when it is pointed that I have. At least I did not say to use an attribute node.

 

Smiley Tongue

 

Ben

 

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

I had to ask to find the replacement.  I have been using that property for years and it suddenly disappeared.

0 Kudos
Message 9 of 17
(2,614 Views)

Well, fantastic. Can't find that either. 

0 Kudos
Message 10 of 17
(2,609 Views)