LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

change properties of controls in an array of clusters

Hello,
 
my latest problem:
i display larga amount of data using arrays of clusters.
the user has to be able to inserst clusters in between, therefore the array solution seems perfect.
However, for each cluster, once a sub-control is defined, i would like some other sub-controls to either become invisible, visible, change ring values...etc.
 
i could not find any way to do it whatsoever. anybody has an idea?
 
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 1 of 12
(4,038 Views)
An array is a set of identical array elements, each identified by its index alone.
 
The only difference between array elements are the values. Cosmetics and properties are identical for all elements of the same array.
0 Kudos
Message 2 of 12
(4,036 Views)

yes i kind of new that .

what i am hoping for is to get ideas for alternative solutions. i am thinking to try to create an xcontrol.

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 3 of 12
(4,028 Views)
In addition arrays often make poor user interfaces.

I don't understand the part about inserting "clusters in between". Can you show an example of what you are trying to do? Someone may be able to offer e better suggestion.

Lynn
0 Kudos
Message 4 of 12
(4,028 Views)
Hi Lynn,
 
actually you can look at an example of how i do it in this thread:
 
the arrays of clusters i display are good example. users considers these array as a timeline, therefore when one wants to add an element in-between, one can just "insert element" into the array.
that is why i have trouble thinking of other solutions.
-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 5 of 12
(4,024 Views)
I assume that this is for a user interface? Something I have done in the past when confronted with this sort of situation is not to use an array of clusters, but a cluster of clusters as the basic display element. This allows you to set the properties of each item seperately. Of course this also means thatyou ahve to do a lot of data manipulation to make this static structure appear to do things like scroll. Or allow the insertion of "elements".

If this is interesting I can go into more detail, but basically the process consists of having an array in the background that holds all your data and using events to select a subset of those elements to be displayed on the front panel. All in all, the process isn't as easy as simply throwing everything into an array for display, but it looks very cool...

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 12
(4,012 Views)

Mike,

That sounds pretty much exactly what i want to do. but it seems, after playing around, that it is an herculeous task to make the thing work nicely...

Do you have an example (would you mind sharing your code?), so i could look and see if i could have easier implementation?

Gabi

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 7 of 12
(4,004 Views)

OK i have found a way, which aint pretty:

prepare in advance a cluster of clusters as you propose.

create for every cluster and every subcluster a property node in which the visible property is selected.

in my system, that account for 24 (big cluster ) * 5 (sub cluster). just to note, every sub cluster has between 3 to 7 controls in.

up to now, still feasabe. the problem comes when i want to add (insert) a big cluster in the middle. cant do it, unless i define an array of clusters, but then i loose the independant control...

i think i need a completely different solution.

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 8 of 12
(3,997 Views)
Hey good work!

I sounds like you are on the right track, so here are a couple more things to throw into the mix. First, remember that given a reference to a "top-level" cluster you can extract references to all the controls inside it on the fly. For example, you take a cluster reference, it has a property called "Controls" this is an array of of references to all the controls inside that cluster. If each of those references is itself a cluster, you can in turn get references to all the controls inside them. Hence you don't really need references to each individual control on the front panel. In fact, all you have to do is figure out how to update one of the inner clusters and then put that code inside a loop so it executes once for each reference in the top-level cluster's Controls property array.

Second, think about how you can generalize the operation such that the you can turn them into subVIs that you can use no matter what the structure of the clusters might be... The information is all there in the control properties.

Finaly, yes I can post an example. I'll put one together this evening and try to get it up online.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 9 of 12
(3,988 Views)

yep, thats the way i did it. however not every control is found directly. the way i did it was to put the whole ensemble inside of a big cluster. from its properties i got the control array, and from then on it was ok. seems to work ok in my example. just need to implement in my prog and see if it works. will use it inside a vit.

i have an idea how to "insert" a cluster in the middle: will add a button with index. once it is pressed the data from this point on is shifted one cluster below. sound doable.

thanks for the trics.

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 10 of 12
(3,976 Views)