LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Switch case list UI

Hi!

 

For pedagocial and c-like reasons i'd like there to be a "Case-unbundle", which would be very nice if you're only calling sub-vi's in a case e.g.

Is there any way to create such a thing?

 

Instead of the Case-square i want it to be a "Unbundle by name" where i connect each output to my sub-vi's (like a multiplexer) and the appropriate one is called.

 

Any ideas?

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 1 of 6
(2,860 Views)

Hi Yamaeda,

do you have a cluster and want to unbundle them? Are this all elements from the same type in your cluster?

Mike

Message 2 of 6
(2,858 Views)

 


For pedagocial and c-like reasons i'd like there to be a "Case-unbundle", which would be very nice if you're only calling sub-vi's in a case e.g.

Is there any way to create such a thing?

 

Instead of the Case-square i want it to be a "Unbundle by name" where i connect each output to my sub-vi's (like a multiplexer) and the appropriate one is called.

 

Any ideas?


 

Do you mean you want to unbundle case by name? Do you want to know which case is connected? 

0 Kudos
Message 3 of 6
(2,856 Views)

Well, nice asumptions, but i have another one:

LabVIEW has a case structure where only one single case is visible at a time. This is a huge difference to C-based languages where a switch-case displayes every case at the same time in a "list".

I think the question from the OP is: "Is it possible to display a case-structure in LabVIEW 'flattened' so that every case is visible at the same time?"

 

And to answer this question: No it is currently not possible, was never possible and hopefully will never be. But you can create a "report" using the print-function and this can automatically create screenshots of each case and display them next to each other..... 

 

 

just my 2cents

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 6
(2,853 Views)

Hi again!

 

You guys are fast! 🙂

 

Norbert is the closest, and my original question might have been badly explained.

My idea is something similar to a Flattened Case, yes, but i also want to avoid the whole box/square (to get a cleaner area). Thus it should look like "unbundle by name", but list the cases instead, and only run the appropriate thread.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 6
(2,835 Views)

Hm, you have a good feedback on LV for certain cases, yes.... but as stated before, i hope there will not be changes to the case-structure.

The explanation for this is: Style. You should always keep your blockdiagram (aka uncompiled sourcecode) as clean as possible. If a case-structure would support such a feature (i think that you are up to a feature similar as the expand/collapse function in C#), the code of a mediocre programmer would be getting worse in comparison to now. And to be honest, most codemodules already suck in regard to style, so such a feature would mess up the whole thing to even worse code....

 

Please note that this is a personal opinion and may differ from other LV-users!

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 6 of 6
(2,818 Views)