From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change state

Hello,

I have made this program and I would like to change one state on the case structure. I want to put "codificando" instead of "Fin OK" but if I change the name in Edit Items of the Enum all the cases of the case structure change and instead of appearing the names, appears 0,1,2,3

How can I change only one name without moving all the cases.

0 Kudos
Message 1 of 5
(2,030 Views)

This is my program

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

This happens because the enum constants in your program are not automatically updated.

You could manually change them all, but there is a better way: make your enum a typedef. Then, recreate all the constants.

When you make changes to a typedef and then apply changes, they are applied to all typedef instances: controls, indicators, constants.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 5
(2,011 Views)

I make  type def. but it doesn´t work.

This is my program

0 Kudos
Message 4 of 5
(1,953 Views)

You did not recreate the constants. It's necessary because they must be typedef'd too.

Once all controls and constants are a typedef, you can change strings (add values, remove values) with a minimal work on the program.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 5
(1,949 Views)