03-31-2016 08:52 AM - last edited on 04-08-2016 09:18 AM by LiliMcDonald
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
03-31-2016 09:02 AM
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
03-31-2016 09:08 AM
I have attached the type definitions of the cluster and of each of the indicators that compose the cluster.
Thanks!
03-31-2016 09:09 AM
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
03-31-2016 09:20 AM
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?
03-31-2016 09:28 AM
On the FP with the type def cluster, right-click on the edge of the array inside the cluster and ....
Ben
03-31-2016 09:38 AM - last edited on 04-13-2016 11:21 AM by LiliMcDonald
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
03-31-2016 09:42 AM
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
03-31-2016 09:50 AM
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
03-31-2016 10:11 AM - edited 03-31-2016 10:15 AM
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.)