LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Editing enums

I worked on parts of my program and then decided to add more after I had already made my enums outside my while loop and inside my case structure. I have state machine tester. After I went in and added to both enums and made them the same and saved them as the same enum controls my selector label at the top of the case structure turned to numbers...did I edit my enum wrong?
0 Kudos
Message 1 of 5
(2,838 Views)

cmhand wrote:
 After I went in and added to both enums

You should make the enum a typedef, and only use a typedef instance (whether you're using it as a control/indicator or as a block diagram constant). This way, you only need to make the change in one place, and you make sure you don't miss anything. The LabVIEW Help discusses how to create typedefs. 

0 Kudos
Message 2 of 5
(2,835 Views)

Your enum control should be saved as strict type def.  Then, any constants created from your enum will automatically update when the enum control changes. 

 

See this thread: http://forums.ni.com/ni/board/message?board.id=170&message.id=18370&query.id=8972#M18370 and this one:  http://forums.ni.com/ni/board/message?board.id=170&message.id=394628  (very good info!!)

 

 

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 5
(2,833 Views)

vt92 wrote:

Your enum control should be saved as strict type def.


You don't really need to go as far as a strict typedef. A strict typedef is only necessary if you have a control and you want to keep the same color/size/font for each instance. 

0 Kudos
Message 4 of 5
(2,828 Views)
Good point.
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 5 of 5
(2,795 Views)