07-21-2011 07:07 PM
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
07-22-2011 07:49 AM
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
07-22-2011 10:24 AM - edited 07-22-2011 10:32 AM
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.
07-22-2011 10:30 AM
"callees" of the VI in question.
Ben
07-22-2011 10:36 AM
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?
07-22-2011 10:37 AM
its a property of the Vi itself.
You also may want to look into scripting.
Ben
07-22-2011 10:46 AM
The Callees property has been replaced by the Get VI Dependencies method. That is why you cannot find it.
07-22-2011 10:50 AM
@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.
Ben
07-22-2011 10:51 AM
I had to ask to find the replacement. I have been using that property for years and it suddenly disappeared.
07-22-2011 11:01 AM
Well, fantastic. Can't find that either.