From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
altenbach

Show labels of diagram constants by default

Status: New

A well documented program requires descriptive labels, but LabVIEW makes it difficult to show the label of diagram constants.

 

 

  • If we change a control or indicator to a constant, the diagram constant retains the same label, but the label is now hidden. 😞
  • Same if we right-click a terminal and create a constant. 😞
  • If we place a diagram constant from the palette, the label is hidden by default. 😞
  • ...
In 99% of my programs, virtually all diagram constants show their labels. They are a vital part of the code, document it clearly, and prevent coding errors.
.

IDEA: show labels of diagram constants by default
  • If we convert a control or indicator to a diagram constant, keep the label and show it! 😄
  • If we create a diagram constant from a terminal, keep the label and show it! 😄
  • If we place a diagram constant from the palette, switch to label edit so we can start typing the label. (same as when placing a control on the FP!) 😄

Examples Scenarios to prove my point:

  • Often I read from spreadsheet file and want to transpose, so I right-click the terminal and "create constant". I get a boolean diagram constant with the label hidden. I would prefer if it would show the "transpose?" labels! This way I can ensure that I did not accidentally used the "append" terminal instead of "transpose". Also, if I edit the program later, it is clear from the label where the boolean goes, even if the wire is mostly hidden.
  • Often, shift registers are initialize with a diagram constant. I use the label of the diagram constant to hint at the content of the shift registers. Labels could be "insert point", "averaged data", "counter", "state", etc. etc. Code is clear and self-documenting. No need for extra diagram comments that might go elsewhere during a diagram cleanup.
  • I might have a control, that (after debugging) will never change again and I thus convert it into a diagram constant. Also here, it should retain its original label and show it. ("Npts", "Frequency", etc.). Again, this keeps the code readable and clear. 

 

 

 

3 Comments
AristosQueue (NI)
NI Employee (retired)

There's already a Tools>>Options setting that does this. I work with it enabled, but it does make for some very awkward situations that I've never figured out good ways to deal with, so I hesitate to encourage others to use it. But if you want to try this...

 

Tools >> Options >> Environment >> Tip Strips & Labeling >> Show Created Constant Labels

altenbach
Knight of NI

Ah, thanks. I wasn't aware of this option...

 

I have now enabled it. I'll see how many awkward stuations i will encounter. 😄

altenbach
Knight of NI

Well, the option "Show Created Constant Labels", partially does what I suggest, and sometimes (=rarely) is a bit annoying,  🙂

 

When placing a diagram constant, it currently goes to edit mode on the value, so we cannot go to edit mode on the label, that would be less convenient. What if diagram constants would have a small default label that we can more easily change (or hide)?