Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Format Numeric.vi

In response to a couple of ideas from the Idea Exchange (here and here), I was inspired to make a quick drop shortcut to attempt to accomadate the spirit of the ideas: a better way to format your numeric controls, indicators, and constants.  So here is my plug in.

 

To install

Put VI in the <LabVIEW>\resource\dialog\QuickDrop\plugins folder.

 

How to use

  1. Open quick drop (Ctrl+Space)
  2. Type in the format specifier you want (I will use %02x as an example).
    • You can also use "dec", "hex", "oct", "bin", and "si" to act in a more generic way.  Hex, Oct, and Bin have the benefit of the number of characters visible will be dependent on the representation and will force the radix to be visible.
  3. Press Ctrl+N (N for numeric)
  4. Any controls, constants, or indicators that you selected that can accept that format will be set to display in that format

 

Release Notes:

V2.0 - Added ability to use generic notation to set all controls/constants selected (ex: hex).

 

 

The VI is saved in 2011.


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 1 of 4
(6,063 Views)

Very nice. I like the idea of displaying the radix automatically.

0 Kudos
Message 2 of 4
(5,149 Views)

I was working on another plugin and realized I could make some good improvements to this one.  So I did!

 

You can now type in "dec", "hex", "oct", "bin", or "si" (case insensitive) into the QD to set the formatting based on the numeric representation.  And to take care of one of my want-to-haves, the hex, oct, and bin force the radix to be visible; dec and si leaves the radix visible property alone.


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 3 of 4
(3,552 Views)

I was doing some clean up of this plugin to get it ready for a VIPM release and decided to make it so this plugin can now directly handle arrays and clusters.  And as I was about to post, I noticed that I missed arrays of clusters (this is in the attached update).

 

So if anybody cares, give this update a try.  Let me know if I missed any scenarios that would be useful or if something doesn't work.

 

Two things of note:

1. This is no longer a single VI (I needed recursion to handle the arrays and clusters) and is therefore an llb.  You cannot just do a replace in your plugins directory, you will need to delete the previous version.

2. It is currently saved in 2019.  I do plan to "Save For Previous" to 2011 before doing a release and package.


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 4 of 4
(95 Views)