Jump to content

SubVIs property = empty array?


i2dx

Recommended Posts

the appended VI should list all SubVIs of a VI. But the array is empty ...

Download File:post-885-1142281377.vi

I am affraid, it will not work at all, but - as I never give up - I'd like to ask, if someone has an idea/tip whatever to get the list of SubVIs?

[edit: minor typo]

The BD is like a "giant cluster", you have to traverse it to get all its objects. If you just get the SubVIs on the Top Level Diagram, you will not get the SubVIs inside structures. There is now a traverse utility in LV 8.0 to traverse BD or FP objects. The attached VI is using this.

post-121-1142291137.gif?width=400

PJM

Download File:post-121-1142291153.vi

Link to comment

For an older example of traversal (and a nifty example of using recursive calls too) search LAVA for Michael Aivaliotis's Set Diagram Color tool.

or another example is in this topic - traverse to get all objects in BD

http://forums.lavag.org/index.php?s=&showt...findpost&p=6737

Don't get me wrong, I love the new traverse tool in LV8. But knowing the traversal and recursion techniques has a lot of other worthwhile uses.

Link to comment

thanks a lot, PJM, you opened the door.

first I got an error at the "to more specific class" node, where the "GObject" references are converted to SubVI references. But when I deleted the Refnum specifier, and created a new one - again with the SubVI-Class - it worked fine. :question:

I added the property "VI Reference" into the loop and now I am able to get the VI References of ALL (including those in Disable Structures !) of the selected VI!

I hope I will soon find the time to implement that into my Project duplicator tool :)

:thumbup:

Download File:post-885-1142452162.zip

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.