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.

Quick Drop Enthusiasts

cancel
Showing results for 
Search instead for 
Did you mean: 

Quick Drop Keyboard Shortcut - While Loop Subdiagram Label

This Quick Drop Keyboard Shortcut creates a new subdiagram label for a While Loop that will have following appearance:

sublabel.png

Follow these instructions to install and use this shortcut:

  1. Save the attached VI in your <LabVIEW>\resource\dialog\QuickDrop\plugins folder.  No LabVIEW restart is required.
  2. Select a While Loop on your diagram.
  3. Press Ctrl-Space.
  4. Type the desired subdiagram label text in the Quick Drop window. For the example shown above, the text "Test Label" was typed.
  5. Press Ctrl-W.

Now your While Loop will have a subdiagram label with the text you specified, and formatted with the color and bolding from the image above.

This shortcut works in LabVIEW 2012. It is not necessary in LabVIEW 2013, since While Loop subdiagram labels are formatted like the image above (bold white text with gray background) by default.

Message 1 of 7
(10,758 Views)

This is great.

Out of interest, how much effort is it to develop a plugin that adds a subdiagram label to an existing (selected) structure, and then colours the label to match? This could then be used on Case Structures and For Loops too.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 7
(4,598 Views)

The current plugin does add a subdiagram label to an existing (selected) While Loop...was that not clear from the description? I'll try to make it more clear. As for other structures, I didn't find a color combination that I liked more than just the default yellow background with black text, But this plugin could certainly be modified to color other structures' subdiagram labels. In fact, the code wouldn't need to change, other than duplicating the existing code and adding different cases (assuming different desired colors/bolding/etc.) for different structure types.

Message 3 of 7
(4,599 Views)

Forgive me, it's late here in the UK, I must be tired and misread it. I honestly thought it created the while loop

Thank you, it's a great plugin!

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 4 of 7
(4,599 Views)

What if I`ve an more than one loop in a single VI.

0 Kudos
Message 5 of 7
(4,599 Views)

I don't understand your question, Ganesha. This shortcut operates on whatever loop is selected. If you select more than one loop, it will only operate on the first one you selected. If you want the shortcut to operate on multiple loops within the same VI simulatenously, you can modify the shortcut code fairly easily, although I didn't really think giving multiple loops the same subdiagram label was a use case worth supporting.

Message 6 of 7
(4,599 Views)

Yeah Dareen I got it, that`s a nice plug in...

0 Kudos
Message 7 of 7
(4,599 Views)