LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

editing an Enum

I am new to labview and am trying to edit some existing code. I have an enum set up as a type def. I'd like to edit the values of the enum. When I change these my code wont compile. I get "Wire class conflict errors". The broken wires where the VI server reference is mapped to a global.

0 Kudos
Message 1 of 5
(3,141 Views)

@uk1980 wrote:

I am new to labview and am trying to edit some existing code. I have an enum set up as a type def. I'd like to edit the values of the enum. When I change these my code wont compile. I get "Wire class conflict errors". The broken wires where the VI server reference is mapped to a global.


VI Server Reference going to a global?  What does that have to do with an enum?  Can you supply code that shows your problem?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 5
(3,130 Views)

The short answer is that you basically cannot edit the values of an Enum.  Think of an Enum as a type of Constant (meaning it doesn't change) that can take on values that you define during code development.  For example, you could have an Enum called "Primary Colors" that takes on the values Red, Green, Blue.  Once you define it, you cannot (at Run Time) change its values!

 

If you want to have a variable that takes on Run-Time-defined names, look into the Text Ring.  However, I will tell you that I use Enums a lot, and have used Text Rings only rarely (and never if an Enum would do).

 

Bob Schor

0 Kudos
Message 3 of 5
(3,095 Views)

I don't see where the OP says they are trying to change values during runtime.  The fact he talks about a broken wire and that the code won't compile is a clue that the code is in edit mode.

 

My first guess is something like the typedef is not applied in the global, or the global needs to be opened and resaved to be sure the update of the typedef gets applied to it.

0 Kudos
Message 4 of 5
(3,082 Views)
If you could post your code -- or at least a bit of it -- it would make it easier to understand your problem.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(3,072 Views)