02-19-2020 08:37 AM
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)?
Solved! Go to Solution.
02-19-2020 09:10 AM
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.
02-19-2020 09:15 AM
I was afraid of that.
You learn something weird every day when using LV 😉
02-20-2020 06:44 AM
@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.
02-20-2020 06:47 AM
OK now try deleting one and see what happens.
02-20-2020 07:05 AM
@aeastet wrote:
OK now try deleting one and see what happens.
I did that too. The values were retained.
02-20-2020 07:10 AM
What version are you using? This was supposed to have been resolved a few years ago.
02-20-2020 10:32 AM - edited 02-20-2020 10:40 AM
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!
02-20-2020 10:37 AM
@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?
02-21-2020 12:16 AM
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'.