LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Shortcuts for case structure manipulation?

Hello all.  I'm curious if there are keyboard shortcuts for duplicating cases or deleting cases in a case structure.  I'm also interested if any of you have any tips or secrets to working with large case structures - LabVIEW mods that enable a storyboard-style case structure reorganizer, for example.

Thanks!
0 Kudos
Message 1 of 7
(5,093 Views)

You might want to look at the state diagram toolkit. BEN raves about it. or maybe a queued state machine.

http://forums.ni.com/ni/board/message?board.id=170&message.id=150553&requireLogin=False

Message 2 of 7
(5,081 Views)

In addition to the exellent answer provided by Unclebump...

when you asked "enable a storyboard-style case structure reorganizer" the only thought that comes to mind is the "Rearrange Cases" option that is available for enum (prefereably type-def'd) driven cases.

See this image.

Ben

Message Edited by Ben on 08-09-2006 08:06 AM

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 7
(5,062 Views)
Ben - I found the "rearrange cases" feature earlier, which prompted me to ask the question.  It's very nearly what I'm looking for, except that ideally you'd be able to add, delete, duplicate, and rename cases from within that box.
0 Kudos
Message 4 of 7
(5,050 Views)
Hello,
 
Another useful feature of case structures is that if you use an enumerated type for the selector, you have the option to "Add Case for Every Value."
 
Best Regards,
 
JLS
Best,
JLS
Sixclear
0 Kudos
Message 5 of 7
(5,039 Views)
JLS wrote:
 
"
Another useful feature of case structures is that if you use an enumerated type for the selector, you have the option to "Add Case for Every Value.
 
"
 
Yes that is handy for enums with a handful of values.
 
The other feature I like about enumerated cases is the ability to NOT have a default case.
 
When this is the situation, LV will remind me that I have not coded up all of the cases in the event I missed one.
 
This is very handy in applications where you have a bunch ( 100 or more) of enum values.
 
If at a later date I decide that I need to add enum value #101 then I edit the typedef and then LV reminds of all the places I have to go and fix.
 
Just a different approach for a different challenge.
 
Ben
 
That reminds of a related trick I have not heard anyone mention lately.
 
Bonus Q:
 
Given a list of all of the enum states (array of strings), what is the easiest way to create an enum with all of those values?
 
Correct answers are worth 5-stars!
 
 
 
 
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 7
(5,035 Views)




 
Ben
 
That reminds of a related trick I have not heard anyone mention lately.
 
Bonus Q:
 
Given a list of all of the enum states (array of strings), what is the easiest way to create an enum with all of those values?
 
Correct answers are worth 5-stars!
 
   


Place a Text Ring on the front panel. On the diagram, create a property node for the text ring, and select the "Strings[ ]" property. Wire the array of strings to the property node. Run the VI.
Right-click on the text ring, and replace with enum.
You will now have an enum with the same values that the text ring had.

Mark.

Message 7 of 7
(5,026 Views)