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: 
0 Kudos
Henrik_Volkers

Set the numeric display format while enter the number

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined. 

Changing the display format can be time consuming....

Why not allow a format header string in the edit mode to set the display format?

formatstring in numeric.png

 

Entering the number could be optional, otherwise the former value is used.

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


8 Comments
crossrulz
Knight of NI

I like the idea of a quick formatting without going through a dialog.  I'm just not quite sold on this though.


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
Norbert_B
Proven Zealot

While i also like the general idea, i have a problem with this specific suggestion:

You type something, but when does it swap to the "other view"?

Can one simply "return to the original view (e.g. format definition)"?

 

Should this be possible by passing a "string" to numeric indicators programmatically?

How does it then connect to the actual value? Is it required to be cast to a string beforehand to match your suggested format string?

 

Just a little curious,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Henrik_Volkers
Trusted Enthusiast

If the first character is a '%', LV check if it is a valid format conversion code (= a valid property 'Format String') follows. If OK, (including the Valid Format Specifiers for Numeric Data Types) set this format. 

 

A number can follow the conversion code  , if not the former value is used

And the seperator between number and format should be a semicolon. (My pic show a colon).... (ah.. detail could be up to NI)

 

 

 

 

 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


AristosQueue (NI)
NI Employee (retired)

It's not exactly discoverable, so it'll be used by very few users, but I think it'd work. I assume this is only while the VI is in edit mode and not while the VI is running, right? I don't think most users would want that kind of reformatting to be possible within their apps by their end users... imagine the confusion if someone reformatted a Hex display as Decimal!

Henrik_Volkers
Trusted Enthusiast

Yes, only in Edit mode. 

And yes, it's more for the ones that use quick drop, define their 'hot keys' and are annoyed by the long time it takes to get the property dialog.. change to advanced mode .. etc.

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


crossrulz
Knight of NI

Actually, Henrik might have just hit on a good way to do this: make it a Quick Drop shortcut.  Something to play with now...


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
crossrulz
Knight of NI

I just posted a Quick Drop plugin that is at least in the right direction.  It may satify your desires.

Format Numeric Quick Drop Plugin


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
Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.