LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure Listing

I've got a case structure with the selector wired to a string input. As it's got a significant number of cases in it, I'm trying to programmatically generate a list of the actual case strings it contains in the selector, without actually executing the structure.
Anyone got any ideas?

FYI; Reason being, I'm trying to write a document containing a description of each case, and I don't want to miss any out!


Many thanks,
Chris.
0 Kudos
Message 1 of 3
(2,633 Views)
Personally, I would simply search the 1D array of possible strings for the current string and use the index of the found element to pick a description out of an array of strings with the descriptions in it.

This doesn`t work if you want to operate code based on the cases, but for a simple description allocation it should work.

I certainly wouldn`t use case structures for this if you`re just looking to link a string value to a particular array.

Shane
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 3
(2,633 Views)
Thanks for the help, but it's not quite what I'm after.
Your idea could actually be a better way of doing this, but I don't really have the time to re-implment it in the existing code.

A bit more info:
My case structure is in a command interpreter. I parse a line of text from a file, split it into a command string which is wired to the selector. The remainder of the string read is a parameter string which is also passed in.

This means that I can't search the data going in, as it's indeterminable, and hence why I'm trying to programmatically read out the string names of the cases in the structure.

Cheers,
Chris.
0 Kudos
Message 3 of 3
(2,633 Views)