LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
AfgVD

Collaspe and expand in switch structure

Under labwindows CVI 2015, I develop a program using a state machine. For this I use a "switch".
The program is voluminous, and in order to browse it more quickly, it would be very interesting to allow the collapse and the expansion of the boxes in a structure "switch"

8 Comments
RavensFan
Knight of NI

This problem sounds analogous to someone trying to code an entire LabVIEW program in one VI taking up numerous screens.  If you have long stretches of commands within a switch structure, shouldn't each of those sections of code be made into a subroutine?

AfgVD
Member

Of course, and it's already done. But that is not enough
The collapse and expansion is operational for all other strcutures (if, for, while, do ...), so why not for the "switch"

Wolfgang
Trusted Enthusiast

Of course, for reasons of consistency, switch statements also should be collapsible.

However, they already are (at least in CVI2015 SP1)

AfgVD
Member

OK.
I only have the version CVI2015 base.
I'll see to install the SP1.
thanks for the information.

RobertoBozzolo
Proven Zealot

The typical state machine built into a switch has normally very large code in each switch case. In this case it would be practical to collapse single cases code, while at present only the while switch can be collapsed. I suppose this is what AfgVD is looking for, and surely is what I would look for!



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
TheNIDragon
NI Employee (retired)

Hi AfgVD,

 

Thanks for your post! I think I understand what you're looking for but just to be sure, in addition to being able to collapse the switch statement itself, you want to be able to close all of the cases themselves, is this correct? 

So from this:

switch_close.png

To this:case_close.png

Collin D.
Software Product Manager
TheNIDragon
NI Employee (retired)
Status changed to: Under Consideration
 
Collin D.
Software Product Manager
AfgVD
Member

hi,

 

Yes it is exactly that