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: 

Unable to resolve VI error: "LabView cannot update from type definition without incorrectly preserving default values"

I can't resolve this error from the Error List dialog: "LabView cannot update from type definition without incorrectly preserving default values"

 

The VI is complicated but nearly all of it can be ignored for this particular issue.

 

I have an enum type def that I use as my state for my state machine.

I changed the type def--added a state, moved some things around.

Now I cannot resolve this error.

 

Under "details" in the "Error List" dialog it tells me "You must right-click this control and select Review and Update from Type Def..."

 

A. I have checked every single instance of my type def (every single one is a constant) and they are all set to "auto-update" which means that the option to "Review and Update" is grayed out and unavailable to me.

 

B. I have even taken the extreme step of deleting the shift register in question, and every single instance of the type def constants from within my code except for one--the input to the case structure.  The error still remains.  At which point clicking on "show error" does a strange thing: it highlights an empty area where the shift register USED to be--but no longer exists.  It seems to me that this must be some bug, since the error remains even after I delete everything that seems to be associated with it.  I'm at an impasse now.  

 

I have attached my main VI "TempPressMain", the "Handle Errors" subVI, and the type def in question.

 

Any ideas?  Much thanks,

Matt

0 Kudos
Message 1 of 2
(3,657 Views)

Oh goodness gracious I figured out my own problem.  My first clue was when I turned on the "warnings" and all of these "unused" and "unwired" constants showed up.  I kept clicking on them and they would appear as an empty box in the middle of a blank white area outside of all the code.  I finally figured out that there were a number of unused constants "hidden" outside the bounds of the case structure--during the long course of coding this up they had been moved and slid right out of the view.  Once I opened up the windows far enough these hidden constants became visible, I was able to delete them all as none of them were doing anything, and since one of them was an un-updated enum constant, that turned out to be the culprit. 

Message 2 of 2
(3,643 Views)