Jump to content

Is it possible to create an expandable subVI?


Recommended Posts

I have a need every now and then to create several instances of the same VI. I was wondering if it was possible (in order to save space and make program flow neater) to make a subVI that is expandable, similar to many of the array functions. For instance, "Build Array" can be expanded by the drag-down menu to make more inputs for you to build the array from. Is it possible to make my own subVI with that functionality?

I suppose I could make the subVI polymorphic with support for arrays of whatever data type I'm using, and when it sees an array of (data type X) repeat the operation on each element of the array, then return another array with the all of the elements operated on, which I could then index... but at that point it's become rather messy, defeating the desire to make an expandable subVI in the first place.

Thanks for your help!

Link to comment

To make an 'infinitely*' expandable sub vi is not possible.

You can do some interesting things with right clicking a SubVI and changing the "View as Icon" context option.

You would need to make a VI w/ the most items on the connector pane, have them all wired up, have some fancy logic in your underlying code, and you would be limited by number of connectors on the pane..... but it might get you close to what visually you're looking for.

Now, if you want to go up in the attic of LV and are willing to get tetanus on a rusty nail, I suggest you look into XNodes.

I'm sure others will be chiming in soon w/ more info on that.

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
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.