LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case structure names change to default values (numbers)

Hello. It happen to me few times and I cannot figure out what I wrong.

I have case structure and cases are selected by type def control. Case structure automatically reads items from control, so each case hase a name from control

.Normal case.png

When I open my type def control and add item, after saving type def the case stracture usulay gives me a choise to  add case for every value and after that I get my new item as a case in in stucture.

Normal case 2.pngNormal case 3.png

But sumtime I add one more or two new items to my control, and case stucture losses the link to it. All names go to default values and there is no more option to add Add case for every value.

Broken.pngBroken1.png

 

 

What am I doing wroing? Why Case stracture loses a link to the type def control?

Thank you 

 

0 Kudos
Message 1 of 4
(4,356 Views)

Do you see those red coercion dots on the terminals? Those mean you have mismatched datatypes that are being coerced to match each other. Somewhere in your code you have an integer written to one of those terminals instead of the type-def. So the type-def is actually being coerced to an integer and that's what the structure is seeing.

 

Find your offending integer, or perform a type-cast, to get your cases back.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 4
(4,355 Views)

Thank you James.

I removed one item in the type def and added two new ones. But one of the cases was using the deletet item as a next case. It is where it broke.

Once I told it to select a new itme as a default, the case structure fixed it self.

 

Thanks again.

0 Kudos
Message 3 of 4
(4,345 Views)

Well there you go. Problem solved

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 4 of 4
(4,334 Views)