LabVIEW Public Beta Program in 2023

cancel
Showing results for 
Search instead for 
Did you mean: 

New Feature: Quick Change Label to Object

In LabVIEW 2023 Q3, after creating a free label (such as by double-clicking in empty space on the panel or diagram and typing some text), you can use the keyboard shortcut Ctrl-Space to display the Quick Change list. Select an item (such as Numeric), and the label will change into that object type. 

 

QuickChangeLabel.gif

 

This feature enables you to create controls and constants without needing to place an object of the correct data type first.

  

You can also use the Edit>Paste Special command to paste text from the clipboard and immediately display the Quick Change list. Try copying a block of data from a spreadsheet and quickly pasting it as an array! 

 

In addition, you can right-click on a free label and choose Quick Change from the shortcut menu to display the Quick Change list. 


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 1 of 13
(4,693 Views)

Hi Christina,

 

My reviews: Label to Object (1 of 2) Label to Object (2 of 2) 

 

Overall takeaway: I like the concept!

 

Key takeaway (video 1):

  • Ideally, I would like this to work with plugins (I would like to make my own)
  • Let's say I copy and paste from a CSV file, it would be nice to have the ability to create a plugin to support that
    • I appreciate there's only so long you want that list to be

Key takeaway (video 2):

  • I looked at the source code for this and was sad it's not implementing plugins (but it is itself a plugin).
  • Label to Boolean object should work with 0, f, false + 1, t, true. Currently, 0 and 1 are not implemented.
Message 2 of 13
(4,498 Views)

Any chance of refining the numeric types a little?

 

At a minimum I would love "Numeric" replaced by separate options for "I32" and "DBL". (If you're feeling generous I'd like "U8" as well, but I understand that that may be too much menu bloat for some!)

Message 3 of 13
(4,373 Views)

Following on from my last post, I discovered some interesting behaviour:

  • If you type "0" and then Quick Change to Numeric you get an I32
  • If you type "0.0" (or even just "0."), then QuickChange to Numeric will create a DBL

That's a decent workaround!

Message 4 of 13
(4,323 Views)

@McQuillan wrote:
  • Label to Boolean object should work with 0, f, false + 1, t, true. Currently, 0 and 1 are not implemented.

I agree! The good news is that the boolean handling is extremely simple to modify using the VI you discovered at "C:\Program Files\National Instruments\LabVIEW 2023\resource\dialog\QuickChange\plugins\PromoteTextLabel.vi"

 

For consistency I'd like to see this obey the same formatting logic as the Scan From String function. From the help:

You can scan for Boolean values if you use a string or numeric format code. If the format code is %s or unwired, the function reads Y, T, TRUE, ON, or YES and any lowercase versions of those words as TRUE Boolean values. The function reads F, FALSE, OFF, or NO and any lowercase versions of those words as FALSE Boolean values. If you specify a numeric format code, the function reads any numeric value greater than 0.5 as TRUE and any numeric value less than or equal to 0.5 as FALSE.

Message 5 of 13
(4,318 Views)

Just browsing the code for "QuickChange Launch Window.vi"...

 

There is a bug with setting the Disabled states of various FP objects. They are set to both "Enabled" (=0) and "Disabled" (=1) in the same frame. I'd be surprised if this wasn't causing some odd behaviour for some users!

fabric_0-1683073907803.png

 

Message 6 of 13
(4,244 Views)

Hi!

 

Love the new feature and agree with comments regarding plug-in support, it would be a (very) "nice-to-have" feature addition.

 

One thing I noticed during testing:
If create list of floating-point numbers, then use quick change to convert to a "Numeric Array", the result is an array of I32 integers rather than an array of doubles. See image below.
 

axw_0-1688293228515.png

 

I suggest making one of the following changes (or maybe both):
1) Automatically detecting the use of floating-point numeric values and converting to an array of doubles if they are detected. Otherwise default to the I32 Array.
2) Include an additional quick label dialog list entry for a floating-point numeric value array

 

Keep up the good work!

 

Best,

Alex W.

0 Kudos
Message 7 of 13
(3,761 Views)

I didn't see an option to edit my post, so assuming the time limit expired. I have small correction to the picture I posted. (I meant to select "Numeric Array" for the illustration, but unintentionally selected "Numeric" instead, which may have caused some confusion. See below for corrected image.

axw_0-1688969001478.png


Thanks!

-Alex W.

0 Kudos
Message 8 of 13
(3,671 Views)

@axw wrote:

If create list of floating-point numbers, then use quick change to convert to a "Numeric Array", the result is an array of I32 integers rather than an array of doubles.

I'm happy to report that this will be working correctly in the LabVIEW 2023 Q3 release.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 9 of 13
(3,640 Views)

Hello Christina,

 

It seems there is a bug in german version when selecting an item in Quick Change list.

 

LabVIEW 2023 Q3 German version_Quick Change error.gif

It seems that the contents in QuickChangeBase_Strings_de.json and QuickChangeBase_Strings_en.json doesn't match.

 

QuickChangeBase_Strings_english and german.png

 

Copying the contents from english to german *.json file works fine

LabVIEW 2023 Q3 German version_After editing JSON file.gif

 

regards,

Nikhil.

 

 

0 Kudos
Message 10 of 13
(3,289 Views)