LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Strict typedefs changes value throughout project

Solved!
Go to solution

Hello everyone,

 

I have a StrictTypedef with an Enum and a String. The Enum holds the names of my Statemachines and the String holds various properties.

I added another Enum for Cases and I recognized that most of the Typedefs I used reverted back to their default settings throughout the whole project (>200 Vi). Luckily I saved the project before and can compare the instances.

 

Is there a way to 'fix' the values of an element which is not touched, even if I change the cluster (add some controls)?

0 Kudos
Message 1 of 14
(2,373 Views)
Solution
Accepted by topic author s.h._tech

No that is one problem with using these. NI does a really poor job maintaining integrity when a change is made to type defs. You have to be very careful when using these.

Tim
GHSP
Message 2 of 14
(2,358 Views)

I was afraid of that.

 

You learn something weird every day when using LV 😉

0 Kudos
Message 3 of 14
(2,355 Views)

@s.h._tech wrote:

Hello everyone,

 

I have a StrictTypedef with an Enum and a String. The Enum holds the names of my Statemachines and the String holds various properties.

I added another Enum for Cases and I recognized that most of the Typedefs I used reverted back to their default settings throughout the whole project (>200 Vi). Luckily I saved the project before and can compare the instances.

 

Is there a way to 'fix' the values of an element which is not touched, even if I change the cluster (add some controls)?


I haven't had that problem.  And I just ran a quick experiment: when I added an enum to the typedef and applied changes, the existing instances retained their values.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 4 of 14
(2,298 Views)

OK now try deleting one and see what happens.

Tim
GHSP
0 Kudos
Message 5 of 14
(2,293 Views)

@aeastet wrote:

OK now try deleting one and see what happens.


I did that too.  The values were retained.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 6 of 14
(2,283 Views)

What version are you using?  This was supposed to have been resolved a few years ago.


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 7 of 14
(2,280 Views)

My general rule of thumb is, when adding or deleting items from a typedef enum, always do so from the bottom of the pile.  If you're adding something, add it to the bottom.  Apply the changes and save all the cascading changes that it creates.  Then re-open the typedef and move the item on the bottom wherever it needs to go.

 

When deleting an item, do it in reverse - move the item to be deleted to the bottom of the pile.  Apply the changes and save everything that changed.  Then re-open the typedef, delete the item, apply and save all the changes.

 

The goal here is not to disturb the values of existing items when you add or remove an item.  LabVIEW is good at tracking order changes, and it's good at keeping track of added or deleted items - just not at the same time!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 8 of 14
(2,254 Views)

@crossrulz wrote:

What version are you using?  This was supposed to have been resolved a few years ago.


Wasn't the "resolution" to alert you that it couldn't update the typedef default value and go to each instance so you can fix it yourself?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 9 of 14
(2,250 Views)

Version: Labview 17

 

Sometimes I get the window, where I can compare changes. But this does not happen all the time.

 

I do not know what conditions triggers the 'change window'.

 

0 Kudos
Message 10 of 14
(2,221 Views)