LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

type def auto update

I've created a custom control which contains a bunch of other controls like arrays, strings,enums... The type def is defined a "Type Def.". I am using this type def on a number of GUI screens. Each one needs to look a little different thats why I didn't define the type def as strict. All controls are setup to automatically update from type def. I added another element to an enum in the type def control and when I saved it all my GUI screens that contain this type def changed appearence! I thought the appearence of the type defs. only changed when they are strict
0 Kudos
Message 1 of 5
(3,245 Views)
Find attached a vi that has a single type def. To understand what I am talking about, open the vi and look at its appearence. Now open the type def and remove one of the items from the "Job Mode" enum. Save it. The vi type def changes appearence big time! I though the type def controls in the vi would not change appearence unless the type def is defined as strict.
0 Kudos
Message 2 of 5
(3,239 Views)

Joe John,

 

           I am able to replicate the behavior on my computer. I am going to talk to a few other people to figure out why that's happening. I do know that Type Def controls like to update if the data type has changed but I don't see how it has in this case. It seems like somehow this is saying "data type has been updated to update all controls" but I don't see how the size of the cluster and control position is tied to this. I will get to the bottom of this and post back. 

Message 3 of 5
(3,211 Views)
thanks. I look forward to the answer!
0 Kudos
Message 4 of 5
(3,203 Views)

Joe John,

 

       So the Type Def is resizing because of changing the items in the enum control changes the data type and this triggers all the instances of the Type Def to update everything. It shouldn't be updating the default position though. This is a function of a Strict Type Def. This is what I gather from my experience and from the documentation of Strict Type Def (http://digital.ni.com/public.nsf/websearch/1B04FD6A11E6F17286256C6300588BFA?OpenDocument). I don't know if the issue lies with the documentation being wrong or the functionality. I have tried the functionality on LabVIEW 2009, 8.6.1, and 8.5.1 and all show the same behavior. I have filed a Corrective Action Request (CAR#206862) so that R&D can fix this (functionality or documentation) but these type of fixes normally get rolled into the next release of LabVIEW.

 

       To the problem at hand, I haven't found any workaround for this behavior. I see the functionality that you are trying to achieve (make certain parts of a large Type Def viewable on multiple VIs) but I don't know if this is the best solution. Because it is so large and this resizing is going to happen if you edit parts, you might think about splitting this into smaller chunks. Have type defs of each control and then have larger type defs made up of those smaller ones. So each individual view would have it's own and if you changed something then it would only effect it minorly instead of having that large type def to deal with.

Message 5 of 5
(3,169 Views)