LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
robmacl

Cluster constant by name

Status: Already Implemented
The request is for labeled constants, which already exists. Proposals for changing the menus to make the menu item (Visible Items >> Label) more obvious would be a new idea if there is a suggestion for how to change that.

I find cluster constants to be nearly unusably because the values must be specified positionally rather than by name.  What I find myself doing, and I guess this is the common idiom, is to do "create constant" to get a constant, then fill in the values using bundle by name.  I'd much rather have an option to have the cluster constant look something like the cluster control, with tips, etc.  This could be another view option, like icon.

 

9 Comments
crossrulz
Knight of NI

I normally just show the labels of the constants inside of the cluster constant

cluster with labels.PNG


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
altenbach
Knight of NI

I must admit that I have no idea what you describe as a problem and what you suggest as a solution. Please add a few more sentences, and maybe an illustration to make the idea clearer for the rest of us.

 

What is "values must be specified positionally rather than by name"?

What is " fill in the values using bundle by name"?


robmacl
Member

positional means "not by name".  When a cluster has more fields than I have fingers on one hand, I'm lost.

 

The post from crossrulz is something like what I had in mind.  I didn't know that was possible beacuse it isn't obvious on the menus and I hadn't seen any code where it was done.  It's also a bit awkward to select just the contents w/o the container, but it's not terrible to turn the names on now that it is possible to do it as a batch using the property dialog.   I'll give that a try.  Given that the mechanism is there, it probably doesn't make sense to add a new one, but it would be useful to add something to the cluster constant right-click menu like "Show all field names" to advertise this feature and make it a bit more convenient.

AristosQueue (NI)
NI Employee (retired)

There's a Tools >> Options setting under "Block Diagram Settings" to have the labels on by default on all created constants. I run with this option turned on.

robmacl
Member

      Tools >> Options setting under "Block Diagram Settings"

 

FYI, for me (LV2011, no SP) the "Show created constant labels" option is under "Environment", and not "Block diagram".

 

GuenterMueller
Active Participant
You are right. It is in "Environment" since ... forever? Is it time to move this option to the "Block Diagram" settings?
robmacl
Member

I tried "Show created constant labels", and I don't like it.  It creates top-level labels on all constants, which I don't like.  I just want the cluster elements labeled.

 

crossrulz
Knight of NI

robmacl - you have to select the individual elements inside of the cluster and then right-click Visible Items->Label


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
JordanG
NI Employee (retired)
Status changed to: Already Implemented
The request is for labeled constants, which already exists. Proposals for changing the menus to make the menu item (Visible Items >> Label) more obvious would be a new idea if there is a suggestion for how to change that.