LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mr._Jim

Alphabetically Reorder Controls in Cluster

Status: Declined

Any idea that has received less than 6 kudos within 6 years after posting will be automatically declined.

Hi All,

 

I regularly deal with large clusters of variables.  Would anyone else use a feature that would reorder cluster controls alphabetically and numerically?

 

 

I've thought of scripting this, and someone else probably already has, but then I thought it might be nice for this to be in LabVIEW natively.

 

 

Thanks for listening,

 

Jim

 

 

11 Comments
X.
Trusted Enthusiast
Trusted Enthusiast

Not sure I understand what you have in mind.

 

If you are referring to the order of elements when using unbundle and bundle primitives, I'd support this suggestion. I would add other sorting options such as: by type, by size (although that is somewhat of a fuzzy criterion), etc...

 

If you are referring to the "order" of elements as shown when using "Reorder Controls In Cluster", I see a potential source of headache when modifying a non-typedef-ed control in a VI and not in another...

 

Mr._Jim
Active Participant

Hi X,

 

To address your comments:

> If you are referring to the order of elements when using unbundle and bundle primitives, I'd support this suggestion.

 

Nope, that's not what I meant, although the default unbundling/bundling order is, of course, indirectly impacted by the order of the controls in the cluster being operated on.

 

> If you are referring to the "order" of elements as shown when using "Reorder Controls In Cluster"

 

Yes, I am...

 

> I see a potential source of headache when modifying a non-typedef-ed control in a VI and not in another...

 

Hmm...  Would not the same headache arise when modifying the order of the cluster in the normal way?  ("Reorder Controls In Cluster")  Besides, wouldn't most proficient LabVIEW users simply make almost all clusters typedefs?  (I, personally, never leave a cluster un-typedef'ed)

 

 

 

Maybe it's not clear what I'm asking for.  Here's what I mean:

1.    Right click on any front panel cluster with two or more elements in it.  (The old way we've been doing this for years)

2.    Select "Reorder Controls in Cluster" from the resulting context menu.

3.    Instead of manually numbering the controls, click on "Alphabetize."  (This part doesn't exist yet)

 

I knew I should have put together an illustration...

 

Alphabetize.png

 

 

Does this clear it up?

 

 

Mr._Jim
Active Participant

Aw, heck.  Who am I kidding?  I've only gotten three votes thus far.  I'll just script it and be done with it.  Smiley Wink

 

I wish I could show you some of the 50+ long variable names I regularly deal with in clusters!  ...and most projects have at least a dozen or two of said clusters.

X.
Trusted Enthusiast
Trusted Enthusiast

I see. Again, if you change the name of one element later on, my first (expanded) interpretation of the functionality you are requesting would still do the job in the new VIs that you would write, while you would have to reorder your cluster elements (and generate a recompilation of all old VIs using your typedef). As you see, I am still not convinced of the utility of the second option (the one your are proposing).

Mr._Jim
Active Participant

In case anyone comes looking for the same idea in the distant future, here's a snippet of my scripted tool.  Instructions are included.

 

I hope I'm not violating Idea Exchange rules by doing this...

 

AlphabetizeClusterTool.png

Ray.R
Knight of NI

Mr.Jim,

 

Don't give up!  I was about to post the same idea.  Kudos!  Kudos! Kudos!

 

I fully understand you pain!!  And yes NI, it is a pain!  More than most people would think...  I am dealing with a cluster which has over 200 elements!!

I inherited the code and must add to the cluster in alpha-numeric order..  Because it has to match parameters in TestStand...  Long story...

 

I will also post a sister thread to this one about the another pain caused by re-ordering clusters!!  The fact that the cluster element label is hidden when trying to re-order them!  I'll be back to post a link.

 

RayR

Ray.R
Knight of NI

Have a look at this thread also:  http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Do-not-hide-cluster-control-label-when-re-order-contro...

 

Especially if you are Kudo-happy...

Mr._Jim
Active Participant

Thanks for the kind words, Ray!  Did you try out the tool in the snippet?  It's in my regular bag of tricks, regularly saving me hours of mundane mouse clicks and hunting through labels for the right item.

 

We can't be the only ones that have to reorder heinously large clusters...

AristosQueue (NI)
NI Employee (retired)

> We can't be the only ones that have to reorder heinously large clusters...

 

No, you can't be, but you're the only one I've ever heard of for whom alphabetic would be anywhere close to useful. These megacluster disasters ususally need to be clumped by related functionality (maybe using alphabetic within each clump, but even then, not). I guess if you're naming elements by giving them a prefix to their name that is that functionality, then it might be useful, but within each clump is still not alphabetical. But that's not usual practice in my observations.

Ray.R
Knight of NI

Jim,

 

I haven't tried it yet.  Just got back from vacation.  I will certainly have a look at it.  Thanks!