LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Order of items in cluster

I have two questions.
First is there a way for me to manually set the order of items in a cluster? (That is the order the show up in when unbundling.) And second, in a program I have been given to maintain, one of the cluster typedefs is arranged poorly on the front panel, and I would like to rearrange them, but I am afraid this might change the order of unbundling and break many parts of the program. How would I go this?
0 Kudos
Message 1 of 8
(3,607 Views)
The order of items can be adjusted by right-clicking on the cluster and selecting Reorder Controls in cluster...

Just moving the cluster content around will not change the order of unbundling (that is desided by the order editable as described in the first lines of this reply)...
0 Kudos
Message 2 of 8
(3,607 Views)
1. Yes. Right click on the cluster and select Reorder Controls In Cluster. Click the black boxes to change the order.

2. If you don't add or delete any of the controls, just moving them around inside the cluster will maintain the order. Jost don't accidently drag a control outside the cluster boundaries while moving it. That's the same thing as deleting a control and then adding a new one. Make the cluster border large enough so that doesn't happen.

3. In the future, look at using the Bundle/Unbundle by name instead. With this function, you access data without regard to the order and you can access all or just part of a cluster.
Message 3 of 8
(3,607 Views)
>3. In the future, look at using the Bundle/Unbundle by name instead. With this function,
> you access data without regard to the order and you can access all or just part of a cluster

I agree that this is better. Perhaps you can also help me with a problem that I have been having that has kept me from using unbundle by name.

I have a cluster indicator on my front panel in which I display data read from a file. (The 'cluster' is actually a large nested data structure which is linked to a typedef.) When the user clicks on certain buttons, I read the data in this indicator and produce summaries of it.
The problem I am having is that to get the value of the indicator, I have to use a property node, but the cluster comming out of the property no
de does not have names for any of the items! Therefore I can't use unbundle by name, but I would really like to because as I mentioned it is a large data structure and I only need one element, and as you mentioned this is more maintainable in the future.

Any ideas?
0 Kudos
Message 4 of 8
(3,607 Views)
Why do you have to use a property node and not either a local variable or the cluster itself?
0 Kudos
Message 5 of 8
(3,607 Views)
"Jackson_Peacock" wrote in message
news:50650000000500000085E20000-1042324653000@exchange.ni.com...
> >3. In the future, look at using the Bundle/Unbundle by name instead.
> With this function,
> > you access data without regard to the order and you can access all
> or just part of a cluster
>
> I agree that this is better. Perhaps you can also help me with a
> problem that I have been having that has kept me from using unbundle
> by name.
>
> I have a cluster indicator on my front panel in which I display data
> read from a file. (The 'cluster' is actually a large nested data
> structure which is linked to a typedef.) When the user clicks on
> certain buttons, I read the data in this indicator and produce
> summaries of it.
> The
problem I am having is that to get the value of the indicator, I
> have to use a property node, but the cluster comming out of the
> property node does not have names for any of the items! Therefore I
> can't use unbundle by name, but I would really like to because as I
> mentioned it is a large data structure and I only need one element,
> and as you mentioned this is more maintainable in the future.

You could use a local variable instead of a property node.
0 Kudos
Message 6 of 8
(3,607 Views)
I could not get data directly from the cluster because it was an indicator.

I had not used local variables before, and did not know about that they were linked to controls on the front panel. After looking into them, they do look like a much cleaner way to get the value of a control then using a property node.

Thanks,
jackson
0 Kudos
Message 7 of 8
(3,607 Views)
A more basic question then is why are you trying to read an indicator as though it were a control? Why can't you get the data from whatever part of the code is populating the indicator?

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 8 of 8
(3,607 Views)