LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

naming and getting names of the cluster elements

Partha dear,

I did and as a consequence now on my front panel I have a cluster with 20 elements, all of them named "visible". And as the names can't be changed at run-time...
0 Kudos
Message 11 of 18
(2,355 Views)
Then, please go thro' the attached library of VIs to get a fair idea of how to play with Cluster elements' properties.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 12 of 18
(2,352 Views)
Sorry, wrong attachment was done.
- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 13 of 18
(2,350 Views)


psilviu wrote:
Partha dear,

I did and as a consequence now on my front panel I have a cluster with 20 elements, all of them named "visible". And as the names can't be changed at run-time...


As tst mentionned earlier, can you describe what you actually want to do?  and why?
 
You can't change the name of the elements at run-time, because if you create a cluster from named controls or indicators, you simply cannot change the names of controls and indicators at run-time.  If you have two clusters and wish to build a single one of 25 elements, then you could unbundle both and rebundle to a single one.   <<<< HOWEVER>>>> As tsts also mentionned, you need to understand what should be grouped together within a cluster.  Having two clusters is perfectly fine..  Which is why we ask what you are trying to accomplish.
 
RayR
0 Kudos
Message 14 of 18
(2,342 Views)
Also, doesn't the example I linked to do essentially what you want?

___________________
Try to take over the world!
0 Kudos
Message 15 of 18
(2,338 Views)
Partha,

As I saw, the example you gave it to me scrolls through all the elements of a panel. What I want is different. I attached a jpg containing an poor solution: creating a cluster constant having (the elements) the desired names. I want better: not to create a cluster constant but geting the names of the coresponding controls, somehow, with a property or something. I don't, repeat, I don't want to change the names during runtime, my topic was not about this.

tst,

Your example is not wat I want.

Silviu
0 Kudos
Message 16 of 18
(2,331 Views)
Hi Silviu,
if you really want to be flexible, why don´t you create only an array from your values and may be another one for all the names? This solution would be very flexible and you don´t need the change to cluster and back.
 
Mike
0 Kudos
Message 17 of 18
(2,326 Views)

If all you want to do is convert the array coming out of the loop into your cluster without needing the manual step, you can use a typecast. You can even use the typecast directly on the array, but I would advise against doing that, because it's not guaranteed to keep working.

If you want to get the names in the first bundle node as well, you can wire the cluster constant into its top terminal.


___________________
Try to take over the world!
0 Kudos
Message 18 of 18
(2,321 Views)