LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I modify the test of an enumeration programmatically?

Hi everyone,
 
I have an application with 8 scopes on it and the data displayed on the scope is selected by a drop down menu which is an enum control that is a typedef.  Since this application interfaces with different hardware, I need to be able to change the text in the menus (that is, the data items being displayed) programattically.  How can I do this?  I don't necessarily need to change the basic enumeration data typedef, but I do need to be able to change the text items within the instance, and I need to be able to do so by index - that is, if there are 10 items in the typedef enum, I need to be able to modify the 3rd one, for example.  Also, I may need to add some or remove some.  Any ideas?
 
Thanks,
 
Jason
0 Kudos
Message 1 of 2
(2,497 Views)
You can't change the values of an enum while the VI is running or waiting to run, so if that's what you want, you should probably use a ring instead of an enum. Then you can use the Strings[] property to extract the array, replace the nth element and rewrite the property.

___________________
Try to take over the world!
0 Kudos
Message 2 of 2
(2,477 Views)