LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Locking an enum value

Solved!
Go to solution

Hey all,

I want to lock an enum to a specific value and make it essentially a constant. Basically I want the enum to keep a value I select upon saving whenopening/closing the VI. Maybe I've just been looking at the code for too long, but is there a simple way to set a default value for the enum that is not the first or last value in the list?

thanks a bunch!

0 Kudos
Message 1 of 3
(2,658 Views)
Solution
Accepted by topic author Jbendig94

You can make any value the default, but it requires a "save" operation to keep the new setting. Simply right-click the enum and "data operation...make current value default".

 

It it should not be operated at run time, make it disabled.

 

If you only need it on the diagram, change it to a diagram constant instead.

 

Sometimes it is easier to save values in a configuration file, this way the value can be defined externally to the VI.

Message 2 of 3
(2,642 Views)

I figured the solution would be that simple.
Thanks for putting me out of my misery on this one! ^_^

0 Kudos
Message 3 of 3
(2,637 Views)