There are many reasons to create a sub VI, but one of the most common reasons is simply to reduce block diagram clutter.
For example, I'm developing a user interface VI and some part of the code starts to get too big for the available block diagram space... After pushing the limits of sub VI density and exhausting all my clever wiring tricks I eventually surrender to the fact that I need to create "yet another single use sub VI"...
This is one of those things that always bugs me. Why?? Because I know I'm adding some project load time, an execution performance hit, some file system clutter... and all I'm getting in return is a sub VI that will never be used anywhere ever again.
So here's my idea:
Allow creation of a "pseudo VI". It would work just like creating a normal sub VI, except no new file would be created. Rather, its code would remain as part of the parent VI, but it would appear as its own entity on the block diagram (just like a normal sub VI).
- The pseudo VI would have a name relative to the parent, e.g. "myLlibrary.lvlib:myParent.vi:myPseudo.pvi"
- It would be visible in the project as a child of the parent VI
- In practice it would behave something like an inlined sub VI
- Because its code would reside inside the parent VI there would be minimal/no performance implications arising from its creation
- A menu option would exist to convert the pseudo VI to a normal VI
- (As an aside, this may also be a good way to achieve the "hard inline" functionality described in this idea)