LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reorder Controls In Cluster of Strict Type Def Custom Control

I am using LabVIEW 2009 Service Pack 1 version 9.0.1 (32-bit).

 

I noticed so odd behavior, or maybe it is a feature, dealing with "Reorder Controls In  Cluster...". I won't go into the details of my design, but I have a custom control set to "Strict Type Def.". My control is a cluster of various states. All elements are boolean, so that the state is on or off. I have need to add additional states. I put them in alphabetical order so that they are easier to find. I also "Reorder Controls In  Cluster..." so that when I use the cluster tools it will be faster to locate the item that I need. Most states are initially off with the exception of a couple which are on. If I add elements before the elements which are on and then reorder the elements, when the VIs that use the customs control are opened, the elements that should be on are now off and the on has been moved by the number of elements that were added. I hope that makes sense. See attached screen shot that may explain it better.

 

- I have a before image.

- I have a Add to Cluster image which shows the custom control after I have added 2 elements and reordered the elements.

- I have the after image once the custom control has been saved.

 

 

I understand the issue and am dealing with it. Just thought that I would pass it along so that other users are aware of it.

 

Download All
0 Kudos
Message 1 of 2
(3,218 Views)

Hey Wild Bill,

 

I thought I might expand upon your clever observation by adding a brief explanation of why exactly that's expected behavior.  As seen in the LabVIEW 2009 Help: Creating Custom Controls, Indicators, and Type Definitions, a strict type definition forces everything about an instance to be identical to the strict type definition, except the caption, label, description, tip strip, and default value.

 

So in your case, the instance of the custom control in your VI is simply retaining its state of "boolean 0 and 1 are False, and boolean 2 and 3 are True" even after you add the additional booleans to your strict type def, change the physical layout, and apply the changes.  And when I say boolean '0' and '1', I am referring to its order in the cluster, not its name in the label.

 

One way to demonstrate this is to add a fourth step to your example.  Open the strict type def, reorder the controls in your cluster, apply the changes, and observe that the booleans which are now 'True' in your VI should change based on which controls you ordered as 2 and 3.

 

- Greg J

 

 

Message 2 of 2
(3,174 Views)