LabVIEW Idea Exchange

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

Easier handling of Case structures

Status: Completed

Available in LabVIEW 2020 and later. You can now remove frames from a multi-frame structure from the 'Rearrange Cases' dialog. This operation supports multi-select, so multiple frames can be removed in a single operation.

I just ran into a situation today where I had a case structure with approximately 64 frames in it, 48 of which I wanted to remove.

 

The method of right-click the selector, select "Remove Case" (This step is right beside the "Insert Case" which is frustrating), repeat 48 times while the mouse is wandering all over the screen between the case selector and the menu selection..... cue carpal tunnel problems.

 

I really wished I could just either use the "delete" and "insert" buttons to mimic the appropriate menu selections

-OR-

Be able to select multiple cases from the "Rearrange cases" window and select "Delete".

19 Comments
drjdpowell
Trusted Enthusiast

If NI were to work on this, I'd like them to also consider the possibility of copying a case from one structure to a other, automatically connecting wires of the same name.  It is common to use templates containing case structures, and is currently a pain to copy code from one to another.

wiebe@CARYA
Knight of NI

>If NI were to work on this, I'd like them to also consider the possibility of copying a case from one structure to a other, automatically connecting wires of the same name.

 

This is implied, but just to make sure: please also make this work for event structure event cases. Or more general, allow to copy any structure diagram to another structure diagram. That would be a great time saver.

AristosQueue (NI)
NI Employee (retired)

I like the original suggestion. I added my kudos.

 

On the follow up suggestion from Powell... really? I cannot recall ever wanting that. I believe you when you say it would be useful, but I wonder how common either you (and Weibe) or I are. A quick glance even through my Actor Framework code, where I use the most templates, I don't see any two structures that are sufficiently similar where this would make sense. The simple ones are all UI patterns, where the frames contain references to the specific front panel, and the complex ones have so many tunnels that they're pretty much unique.

 

Regardless, the suggestion to make frames movable between structures is a separate idea and should not be tied to this relatively straightforward request.

wiebe@CARYA
Knight of NI

@AQ:

Agreed, getting OT.

crossrulz
Knight of NI

Just noting that I would prefer the additional capability in the "Rearrange Cases" window.  The Delete key will already delete the entire structure and anything inside of it.  Finding another place to select just to make sure it will just delete that case sounds like a usability nightmare.


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
drjdpowell
Trusted Enthusiast

AQ, that's an advantage of your using the command pattern in the AF.  When one is using strings (Messenger Library, DQMH, JKI, etc.) or enums then one is using case structures.

Gregory
Trusted Enthusiast

This is one of the things I like jcarmody's case select (now JKI state machine editor) for. I think I had to make some modifications so it will work on any case structure, but it makes large structures much easier to work with.

VukObradovic
Member

 Did anybody try to implement "multiple case delete operation" using VI scripting? 

Vuk Obradović
Technical lead / Senior R&D Engineer at Noffz Forsteh technologies d.o.o.
wiebe@CARYA
Knight of NI

>Did anybody try to implement "multiple case delete operation" using VI scripting? 

 

That should be fairly easy. Not much scripting involved at all:

CaseStructure Scripting.png

Listbox for the names, select, and delete index (in reversed sorted order!).

zou
Trusted Enthusiast
Trusted Enthusiast

You can do all that yourself: customize the properties dialog of the case structure.

case structure.jpg

 

Customize Property Pages

 

George Zou