LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

xControl: cannot update definition without incorrectly preserving default values

In an xControl, when I change the Data.ctl typdef and apply changes, the instances are not updated & the VI's have the error "labview cannot update definition without incorrectly preserving default values".

On an ordinary VI, I would be able to right-click on the control and select "Review & Update from Type Def..." to resolve the error;

but it is not possible to right-click on the instances of the Data.ctl.

How do I resolve this issue with an xControl?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 3
(3,209 Views)

Can you attach a simple example showing the issue?

 

If i had to guess, the following must be the case:

a) The data type of the xControl is no simple basic data type. Most likely a cluster.

b) You change the data type (data.ctl) to something incomptible (e.g. swapping a cluster data field to an incompatible data type or removing fields)

c) You have calling instances which define a default value (read: you did a right click on them and selected "Make current value default")

 

At least this is what i read from the error description. It means that default values cannot be updated as such that they match the new data type.

 

Solution would be to identify that defaulted instances before changing data.ctl and to re-create that controls to get rid of the default value.

 

Norbert

 

EDIT: Possibly you can capture the issue also with adding appropriate code to the Init ability. However, i don't know if a complete change of a data type can be addressed with this....

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 3
(3,192 Views)

I am able to work around the problem by using scripting to force controls to update.

I mistakenly said that it was the Data.ctl, it is actually the State.ctl (which is a cluster) that causes trouble.

Sometimes the problem happens, and sometimes it doesn't.

The attached files show the problem.

"If you weren't supposed to push it, it wouldn't be a button."
Download All
0 Kudos
Message 3 of 3
(3,176 Views)