BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Rube Goldberg Code


@cbutcher wrote:

More useful displays might include adding units, or labeling your indicators 'inline' (obviously for display only). (Maybe you can actually get the text representation and then do something?)

Example_VI.png


Writing to that property is exactly what my Format Numeric Quick Drop plugin does.  And, yes, I put units in the format all the time.  One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation).  This will show values like "2.4GHz" and "10Hz".  That is a lot easier to read than 2400000000.


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
Message 2101 of 2,565
(10,092 Views)

@crossrulz wrote:

@cbutcher wrote:

More useful displays might include adding units, or labeling your indicators 'inline' (obviously for display only). (Maybe you can actually get the text representation and then do something?)

Example_VI.png


Writing to that property is exactly what my Format Numeric Quick Drop plugin does.  And, yes, I put units in the format all the time.  One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation).  This will show values like "2.4GHz" and "10Hz".  That is a lot easier to read than 2400000000.


IIRC, this doesn't work that well for controls though. Some units confuse the input, mixing up the SI Notation and units.

0 Kudos
Message 2102 of 2,565
(10,084 Views)

wiebe@CARYA wrote:

@crossrulz wrote:

And, yes, I put units in the format all the time.  One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation).  This will show values like "2.4GHz" and "10Hz".  That is a lot easier to read than 2400000000.


IIRC, this doesn't work that well for controls though. Some units confuse the input, mixing up the SI Notation and units.


The only time I have ran into problems was with a Scan From String.  But that CAR (425562) was fixed at some point.  I just tested with 2016 and it works fine.  I would have to do some more forum digging to figure out when it was fixed.

 

EDIT: I just realized what you were referring to.  Like "meters" is shortened to "m", which can be interpreted as "mili".  I will have to play around with that one to see how controls react.  I would guess it would be fine as long as the user did not enter the units.


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
0 Kudos
Message 2103 of 2,565
(10,081 Views)

Also have a faint recollection about mft (milli feet) that didn't work...

 

Not sure what the problem was exactly, but meters being interpreted as 10E-3 sounds familiar.

 

Units are more or less obsolete (not supported in NXG for sure). They are still natively supported in C++ though. There are use cases...

 

I especially use them for automatic conversion when using by reference. So I use references to load\store values in an ini file. The value property returns the real value, for instance in meters or kg) regardless the unit. The user sees the values in mm or grams. The real unit doesn't matter, I only use it to automatically convert between n, u, m, -, k, M, G, etc. Very convenient, and no substitute.

0 Kudos
Message 2104 of 2,565
(10,061 Views)

@crossrulz wrote:
One of my favorite formats is "%#pHz" ('#' ignores 0s after the decimal, 'p' is for SI Notation).  This will show values like "2.4GHz" and "10Hz".

My favorite is some flavor of %.2ps to display benchmark timing (100.00ms, 900.00ns, 20.00s, etc.)

Message 2105 of 2,565
(10,051 Views)

Sounds like we need a thread in Breakpoint or a Nugget for this. It is an interesting concept and I think there are a lot of people that could use this information.

Tim
GHSP
0 Kudos
Message 2106 of 2,565
(10,045 Views)

@aeastet wrote:

Sounds like we need a thread in Breakpoint or a Nugget for this.


Well yes. 😄

Message 2107 of 2,565
(10,035 Views)

wiebe@CARYA wrote:

Also have a faint recollection about mft (milli feet) that didn't work...


Having an electronics background I'm familiar with "mil" (thousandth of an inch) due to working with circuit boards, but this is the first time I've ever heard of "milli feet".  Coming from a country that is metric (hang on, isn't the U.S. officially metric too?) the idea of milli feet is horrifying.Smiley Surprised

Troy - CLD "If a hammer is the only tool you have, everything starts to look like a nail." ~ Maslow/Kaplan - Law of the instrument
0 Kudos
Message 2108 of 2,565
(10,008 Views)

I guess a millipede has 1000000 mft. 😄

Message 2109 of 2,565
(9,990 Views)

@altenbach wrote:

I guess a millipede has 1000000 mft. 😄


And,  I took a wrong turn this morning on the way to the office,  Suddenly I'm driving 120....How fast is that?

 

Spoiler
Maybe I should take a bus I bet C.A. would approve

more like 12,000,000 m" (or 1,000,000 m') It could be 1Mm'


"Should be" isn't "Is" -Jay
0 Kudos
Message 2110 of 2,565
(9,960 Views)