LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"explode" a subvi

Hi All,
I have inherited a rather complex VI with multiple layers of one subvi in another. I'd like to know if it possible to "explode" or "uncreate" a subvi so that its components return to the original block diagram. Anyone ever done this?

thanks

Richard
0 Kudos
Message 1 of 7
(5,046 Views)
If you haven't saved it, you can revert the VI.  If you have them as two separate VIs already, you will have to copy and paste the diagram from the subVI to the original VI.

Hope that this helps,
Bob Young

0 Kudos
Message 2 of 7
(5,039 Views)
I am not aware of any automatic method, but your suggestion could be a useful addition to LabVIEW, especially for subVIs that only contain very little.
 
In symmetry to "Create subVI", we should have an option to  "flatten to diagram" when selecting or right-clicking a subVI. Of course it could create a huge mess if the subVI is gigantic. 😉
 
Long ago I was pondering similar ideas, especially when programming for the coding challenges where removing the subVI call overhead could shave a few nanoseconds off. 😉
 
You could make a product suggestion on the feedback page: http://sine.ni.com/apps/utf8/nicc.call_me?p_lang_id=US 🙂
 

Message Edited by altenbach on 03-15-2006 09:28 AM

Message 3 of 7
(5,032 Views)

Y'all have me recalling an old Saturday Night Live skit where they were spoofing "Leave it to Beaver". Smiley Surprised

Beaver was depressed over something and says "If I had a gun I'd shoot myself!". Eddie Haskle responds "Here Beav, you can borrow mine."

When I face code like that described above I'd just start editing VI icons with B&W text to be able to decypher what I am looking at. I usually continue that until I finally decide to just throw it all away and do it right. Smiley Wink

Ben

Message Edited by Ben on 03-15-2006 11:36 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 7
(5,023 Views)
In Labview, goto "Tools\Advanced\ Edit pallete set" . Locate the subvi which you want to explode, right click it on it & click on "merge VI".
Now save the pallete & place the SubVI on BD. The subvi get exploded !!!!
 
I hope this solves ur question???
0 Kudos
Message 5 of 7
(4,871 Views)
Hi amitkaria,

good point...
But this only helps half the way, as it is a permanent setting and works only on vi's in the palettes.

It would be much nicer to have this on any subvi, either by right-click on the subvi or by selecting a menu entry like 'Create subvi'!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(4,867 Views)

Hello,

 

From http://zone.ni.com/devzone/cda/pub/p/id/347

 

The LabVIEW compiler performs compile-time inlining, but you also can force inlining in the development environment by adding the line “inlineSubVIEnabled=TRUE” to your LabVIEW.ini file. Once you restart LabVIEW, a new item called Inline subVI appears in the right-click menu of subVIs on block diagrams (see Figure 4). Selecting this item moves the code from the subVI into the calling VI, effectively the reverse of “Create subVI.” This feature does not usually make for the most attractive code and removes several often important features of using subVIs – including modularity, encapsulation, and scalability – but it is a handy shortcut if you need to force visibility in the development environment.

Message 7 of 7
(4,573 Views)