LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
jeffreyvalecruz

Collapse code into icon instead of creating a subVI

Sometimes we create code, which is not reused elsewhere, but may be visually large or unpleasant (bad readability etc). Creating a file/subVI is not always the most elegant approach to solve this, but seems to be the only option.

 

It would be nice, to have the option to "Collapse" and "Expand" code parts (like some editors for textual programming have).

 

The example below may not candidate as visually large or unpleasant, but here goes... 

 

We have some code.

 

Original Code

 

And wants to collapse part of the code.

 

Code to Collapse

 

We mark/select the code part and right-click. From the menu, we select "Collapse".

 

Right-Click menu to Collapse

 

The code we selected, collapses into some icon, without generating any files. It is purely visual.

 

New Code View

 

If we want to edit or see the collapsed code, we double-click the icon, to open a new window containing the code.

 

Open or Edit Collapsed Code Window

 

If we want to return to the originally code view, we right-click the icon and select "Expand".

 

Expand Code Icon

 

We now see our code in its originally form...

 

Back to Original Code View

 

I think this option would be nice to have.

 

 

5 Comments
crossrulz
Knight of NI

Duplicate: Allow Hide/Unhide of code inside Block Diagram, without using SubVI


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
X.
Trusted Enthusiast
Trusted Enthusiast

 Or this one: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Collapsible-code/idi-p/1209625

 

I used the New Idea feature and started typing your title: Collapse Code... and that very idea popped up as a suggestion.

What about that suggestion: do a search first?

jeffreyvalecruz
Member
Ok should have done a more extensive search before posting... anyways, kudos to those before me!
X.
Trusted Enthusiast
Trusted Enthusiast

I am just saying that you would have saved yourself a lot of work...

Darren
Proven Zealot