LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case statement: can I create cases from array of strings

I would like to construct a case statement from a spreadsheet of names and actions. For example
createfile 21
Erasefile 22
and so on. It is easier to review the design as a spreadsheet than as a case statement. Also spelling errors can be tedious to find.
0 Kudos
Message 1 of 4
(2,932 Views)
Yes you can , but , a better wya is to use a type def if you can... attached is a simple state machine example.... it uses a Strict Type Def Enum (customized control). that way if you make a change to the type def it is propagated to all instances...
the other cool part is that any case can send you to any other case...

Dan
Download All
0 Kudos
Message 2 of 4
(2,932 Views)
also when you use the type def you can right click the case and pick "add case for every value" and the case structure will fill with as many cases as you have elements in your enum..

Dan
0 Kudos
Message 3 of 4
(2,932 Views)
Thanks,
This is the cool thihg I wanted "Add case for every value"
0 Kudos
Message 4 of 4
(2,932 Views)