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 accommodate 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 llb 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).

V3.0 - Added direct compatibility with clusters and arrays.

 

Now released in VIPM.  The attached file is for supporting those using older versions of LabVIEW.

The LLB 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 5
(6,764 Views)

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

0 Kudos
Message 2 of 5
(5,850 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 5
(4,253 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 5
(796 Views)

The VIPM package is now live: https://www.vipm.io/package/crossrulz_lib_format_numeric/ 

 

The package is >=2019.  I will create the llb and add it here for those who are using older versions.


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 5 of 5
(690 Views)