LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic control in front panel

Hi!

 

I have the following type definition (attached image) which is a cluster that contains an array of booleans and an array of doubles. Currently each array contains 8 elements.

However i will have two cases:

In the first one I will need the 8 elements in each array. But in the second case I will need just 6 elements in each array.

 

Is there anyway to change this cluster dynamically so that it resizes to show 6 elements when I am in the second case?

 

Thanks in advance.

 

Admin note: attachment removed per user's request - 04/08/2016

0 Kudos
Message 1 of 15
(6,079 Views)

I'm getting a reputation here as someone who says "Attach code, not pictures".  If you had attached your Control, we could have "played with it", and perhaps suggested ways (or code) to make it do what you want.  Attach your VI/Control, not a jpg.

 

Bob Schor

Message 2 of 15
(6,072 Views)

I have attached the type definitions of the cluster and of each of the indicators that compose the cluster.

 

Thanks!

0 Kudos
Message 3 of 15
(6,058 Views)

For both arrays...

 

Pop-up>>> create property node >>> "num Collumns".

 

Should NOT work with strict type def.

 

Set the cluster to "SIze to Fit"

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 15
(6,054 Views)

Sorry but i dont understand what you mean by pop-up... is it an option when you open the type definition of the array controls?

0 Kudos
Message 5 of 15
(6,040 Views)

On the FP with the type def cluster, right-click on the edge of the array inside the cluster and ....

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 15
(6,037 Views)

I have done what you say..  however in the case the arrays don't change their number of columns from 8 to 6.. they just keep on having two uninitialized as shown in the image.. I am attaching the VI.

The relevant code is in the case program.

 

Thanks!

 

Admin note: attachment removed per user's request - 04/13/2016

0 Kudos
Message 7 of 15
(6,029 Views)

From the array palette use the "array size" to determine how many values are in the array and then use that to set the number of collumns.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 15
(6,017 Views)

Yes it does the same as wiring the constant 6 (I know the size of both arrays will be 6) in this case.

 

What i want is the appearance of the cluster changes. 

I want that instead of having a cluster with two values uninitialized in each array I have just 6 values.

 

As I said before I will have other case in which the size of the arrays will be 8, therefore i want the controls to adjust and show the elements (6 or 😎 according to the size of those arrays.

 

Thank you

0 Kudos
Message 9 of 15
(6,011 Views)

You didn't follow Ben's directions.

 

He is telling you how to make a property node that looks like this.

 

(You'd need 4 of them, one for each array in each of the two clusters.)

 

Message 10 of 15
(5,985 Views)