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: 
SteenSchmidt

"View As Color Box" option on numerics?

Status: Completed

Available in LabVIEW 2016 and later. Right-click on a U32 Numeric control/indicator/constant and select 'Replace with Color Box'. Right-click on a color box control/indicator/constant and select 'Replace with U32 Numeric'.

Hi,

 

There are numerous ideas floating around about where the color box constant and control should be located in the palettes. How about if there wasn't a distinction between a color box and its numeric representation? Like the "View As Icon" option on terminals and clusters, I suggest a "View As Color Box" on numeric constants and controls/indicators:

 

ViewAsColorBox.png 

 

I'm undecided on if this options should be available for all numeric data types, integers only, or U32 only, and what should happen to the Representation options when the numeric is a color box. I see at least these options (ordered after my preference - I prefer 1) the most):

 

1) The "View As Color Box" option is available for all numeric data types, but when selected the data type changes into U32. If you change Representation to anything else but U32, the "View As Color Box" option is automatically deselected.

 

2) The "View As Color Box" option is available only when the numeric is U32.

 

3) The "View As Color Box" option is available for all numeric data types, and coercion happens between the selected "color value" (U32) and the true Representation of the numeric.

 

Several ideas would be fixed by this, for instance this and this.

 

Cheers,

Steen

CLA, CTA, CLED & LabVIEW Champion
15 Comments
fabric
Active Participant

In practice I'd be more than happy with option (2). 

 

Seems somewhat unintuitive to mix coersion with changes to the view setting... I can't think of any times I've wanted to convert a double to a colour box. (That would seem like a job for a mapping function...)

dthor
Active Participant

My vote is option 1 or 2 - they're effectively the same thing in my mind.

 

I'm not a fan of having the data coerce when changing the display format, so I don't like option 3.

 

Good idea!

SteenSchmidt
Trusted Enthusiast

I agree that option 3) is unintuitive and dangerous - let's strike that.

 

Option 1) came to since when you create a numeric control on the front panel it's DBL by default. If you really wanted a color box then it'd be easy just to right click on that control and select "View As Color Box" without having to set Representation to U32 first - it will then both be changed to U32 and displayed as a color box. So it's a question of when that option is available in the menu.

 

I don't think option 1) does any harm compared to the puristic 2), except it could be necessary to highlight the resulting type change perhaps? Perhaps not even that. I haven't looked into how LabVIEW handles other automatic type changes - from memory I don't think such are highlighted in particular?

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
fabric
Active Participant

Main benefit of (2) over (1) is that is would reduce menu bloat a little for non-U32 numerics... but I'd settle for either.

SteenSchmidt
Trusted Enthusiast

You're right, and I'd settle for both as well. I'd leave that part up to NI to flesh out, as they probably have people experienced with doing the pros/cons analysis (if the option isn't available for a DBL, then the users need another way to be told how to get a color box for instance).

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
altenbach
Knight of NI

I think the following mechanism would be sufficient:

 

RIght-click...replace...numeric palette...color box.

 

(This requires a "right-click...replace..numeric palette" menu (this entry is currenty missing for numeric diagram constants :(), and requires the colorbox constant to also reside in the numeric palette (as suggested here).

taper
Member

For an add on, if changing a color box to U32 default to hex display.  Other radix don't make sense.


--Using LV8.2, 8.6, 2009, 2012--
Yamaeda
Proven Zealot

I'd be happy with Altenbachs version of simply placing a colorbox constant in the numeric palette so you can use the Replace function in a good manner.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
sridar.m
Member

Nice feature to have good one

Mathis_B
Member
How about making it part of the Radix options? It is obviously a stretch of what radix actually means but it would a way to avoid the right click menu of getting more cluttered.