10-11-2010 11:06 AM
Cool LabVIEW 2010 Features Part IX: Visible Display Style on Strings
Here we have another great Idea Exchange idea that made it into LabVIEW 2010:
You can right-click any string constant, control, or indicator and choose Visible Items > Display Style. That will display the little radix (just like with numerics) that indicates whether the string is displaying in Normal (n), '\' Codes (\), Password (p), or Hex (x) display.
The front panel illustration above shows my favorite use case for this feature...I will often right-click on a string control or constant and choose '\' Codes, just to see if that string contains any whitespace characters that I can't see in normal display. With the Display Style option, I can very quickly click the radix to switch back and forth between display styles to check this scenario.
10-11-2010 12:12 PM
If you create a string indicator on the front panel by selecting String Indicator from the String palette, you do not have the Display Style option under Visible Items. However, if you create a string indicator from the block diagram by right clicking on a string control or string constant, then selecting Create - indicator, then you do have the Display Style option. Is this an oversight?
If you create a string indicator on the front panel (no Display Style option available), the right click and select Change to Control, you still don't have the Display Style option.
At least that is the way it all works on my computer. Can someone else confirm?
10-11-2010 12:24 PM
I can duplicate that as well. Putting a string control on the front panel will show the option Visible Items->Display Style, but an indicator will not. Changing an indicator to a control will not add the option. Changing a control to an indicator keeps the option.
10-11-2010 12:28 PM
Can someone else confirm?
yes, there seem to be some lose ends. The "system string" and "classic strings" don't seem to have it either.
10-11-2010 12:47 PM - edited 10-11-2010 12:57 PM
The Modern string control is the only control that has the Display Style option. The System, Classic, and Simple string controls do not currently support it (not sure how NI could edit the behavior of a System control since it adapts to the look of the OS). If you are getting the Display Style option when creating string controls from diagram constants, maybe you have your "Control Style for New VIs" set to "Modern"?
Tools » Options » Front Panel » Control Style for New VIs
10-11-2010 12:49 PM
I could understand it the System style did not include the option, because I have never seen anything like it in other applications. However, it should be documented if it is not available.
Also, I created a property node for the String indicator I dropped on the FP. I set DisplayFormatVisibility to True. This generates error 1054 with this explanation:
Error 1054 occurred at Property Node (arg 1) in Untitled 1
Possible reason(s):LabVIEW: The specified object was not found.Property Name: Display Format Visible?
10-11-2010 12:51 PM - edited 10-11-2010 12:53 PM
The System, Classic, and Simple string controls do not currently support it (don't see how a System control could do this).
The system numeric supports the "radix" display option, so why would a system string be any different? The display format could be shown very similarly.
10-11-2010 12:55 PM
The system numeric supports the "radix" display option, so why would a system string be any different?
Is this ability not built into the System numeric by the OS? Maybe someone who's used the System numeric in another language could weigh in...
10-11-2010 01:13 PM
This is definitely a feature that is very valuable. I've been burned before by unseen spaces, and display set to hex when I assumed it was normal. Having the style shown would be a big help.
I would like to see all the loose ends fixed. Darrin, can you please submit a CAR?