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: 

strict type def data blown out when updated

I juat updated to 2012 and I saw that when I update a stryct type def of an enum type that it blew out all of my previous constants. I have arrays of empty arrys of enums. I know it did not do this before. I simply edited the list by removing an item save and applied the changes and now everythig is going.

 

Lots of extra work to go back and reset all of these.

Tim
GHSP
0 Kudos
Message 1 of 4
(2,400 Views)

TO add to this. It seems that if I hit the rex X in the corner of the type def when closing before I have saved and applied. When it asked to save I say yes go back to my code and no more constants. This is the second time that I have had this problem today.

 

To many extra hours because of new bugs on old things!!!!!!

Tim
GHSP
0 Kudos
Message 2 of 4
(2,390 Views)

Quoting from My Type Def Nugget from march 2007 in the notes section

 

"

*** Type def’s define the data type and not the default values. You cannot use type def’s to establish default values. If you modify a type def that is used as constant on a diagram, all instances of that type def will be replaced with new instances. Default values that were saved in the block diagram will be lost when the constant is replaced with the new definition. This is by design. The method I suggest for establishing a default value is to use a sub-VI to explicitly define the value. In the case of clusters use a bundle by name node to set the fields as required.

 

 

...

 

Where I have illustrate the use of sub-VI’s to establish default values. In the example, there are two sets of default values of the type definition “Chan Info” (Channel Information) denoted by the green and grayed-out icons.

 

 

"

 

So...

 

I do not think it is a bug and is not new.

 

Frustrating?

 

Yes.

 

I use a sub-VI to establish the defaults. It adds another VI to the mix but it allows me to change it in one place instead of chasing down many and it also gives you a little documentation to explain what is what.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 4
(2,382 Views)

Hey Ben thank you for your response. The problem I was having was not the values for the constants. I literally had to go through and replace every Strict Type def in my program to get it to work again. I do store the default values somewhere else.

Tim
GHSP
0 Kudos
Message 4 of 4
(2,329 Views)