LabVIEW Idea Exchange

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

Caption.Text Property to default as an empty string

Status: New

When a control caption.text property is called and the caption has not been set in the Properties dialog of the control an error is thrown.

caption text code.PNG

error 1320.PNG

It would be nice for the caption.text to default as an empty string so an error wouldn’t be thrown when it is called in the block diagram.  This would allow easier runtime editing of each control on the VI.

3 Comments
CrystalTech
Member

It is pretty much a default of NI to give you an error pop-up whenever you do not connect an error output.  This is not an NI problem.  It is a Feature!  🙂  It seems the only reasonable request would be to ask NI for a global selection to switch this feature off.

Happy Wiring.

jgcode
Active Participant

@ CrystralTech, I think its the fact that you get an error in the first place, not the 'popup behavior' that the joshe was referring to.

@ joshe - an explanation on this design decision is available in Christina Roger's article Captions from her Eyes on VIs blog.

The article it explains why, and is a great read!

Certified LabVIEW Architect * LabVIEW Champion
joshe
Active Participant

jgcode, Thanks for the link to Christina Roger's article Captions, it did explain some.  I just ran into the issue when creating a really big GUI that allowed the user to change the control names (the caption text) based on what they connected to on some equipment.  I found it really annoying to have to check every control to see if I had a caption label and get the error if I missed one.  I don't know how much overhead it would add to have the caption text be created with the control and default to a empty string (not being shown if it is an empty string) but I think it would be worth it based on the code I am developing.