LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

expand case statement

Is there a way to expand the case statement in Labview 8.6?

 

For example, I have two cases.

 

Case 1: Testing Option A, Testing Option B, Testing Option C

Case 2: Testing Option D, Testing Option E

 

but case 1 is showing as "Testing Option A....Testing Option C".  Is there a way to force case 1 to expand so that it shows all the options?

0 Kudos
Message 1 of 6
(2,990 Views)

I could not get the question properly.

 

but If you resize the case structure (make it bigger horizontally) then you can see all the case staements in the case structure..

Regards
Guru (CLA)
0 Kudos
Message 2 of 6
(2,959 Views)

Can I assume that the value going into the Case Selector is an Enum?

 

The case titles at the top of the case will always show consecutive values as first .. last.  So if you have an Enum where OptionA is 0, Option B is 1, Option C is 2, Option D is 3, then the case for Options A, B, and C are 0, 1, 2, thus consecutive, thus 0..2.  Since case structures show the Enums as their labels, it will be Option A .. Option C.

 

There is no other way around that unless you have other numeric values in between that aren't a part of the case statement, so A, C, and E (0, 2, 4) would be Option A, Option C, Option E and be separated by commas.

Message 3 of 6
(2,943 Views)

guru,

 

expanding doesn't work.

 

 

Here is to clarify what I meant:

case.PNG

 

 

 

raven,

so there is no way to work around this issue by expanding the commas separation section?  This happens in labview 8.6.  Did NI ever fixed this issue in their later labview version?

0 Kudos
Message 4 of 6
(2,930 Views)

Correct.  Expanding the case structure does not cause all of the other in between cases to show in a comma delimited list in any LV version that I have used (7.1 .. 2010).  There is nothing to fix because there is nothing broken.  The case structure was designed to show consectutive values in a first .. last format.  That is a whole lot easier to know what is included than to have a really long list that won't fit on the structure that specifically lists all of the items.

 

There was a recent idea on the idea exchange (and possibly some older ideas that I didn't search for) that might go towards helping users of future LabVIEW versions determine what is in different cases more clearly.

 

Structure navigation (case structure, event structure, stacked sequence, etc...) 

 

 

 

0 Kudos
Message 5 of 6
(2,917 Views)

 


@lavalava wrote:
so there is no way to work around this issue by expanding the commas separation section?  This happens in labview 8.6.  Did NI ever fixed this issue in their later labview version?

 

This functionality is still not possible in later versions of LabVIEW, because I don't think NI saw this as an "issue".

This may be desireable for a small list of items, but what if there is a large number of cases?

The case structure would expand to take up a huge amount of the block diagram.

 

If you would like this functionality in future versions of LabVIEW, feel free to submit it to the Idea Exchange.

Cory K
0 Kudos
Message 6 of 6
(2,916 Views)