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 plugin: Add to event structure

This plugin takes any amount of selected controls, and all controls (not indicators!) that are selected will have a "Value changed" event added for them to an event structure. The block diagram terminal will then be moved into the event case matching it.

 

I use this constantly whenever I am creating a user interface VI.  It's far easier to select 20 controls and press Control-space, Control-E than it is to individually add 20 new event cases to an event structure to handle the assorted buttons and data entry fields that I've just placed.

 

This was developed and tested under LabVIEW 2015 only, so I don't know if it's backwards or forwards compatible.  Default shortcut is Ctrl-E.

Message 1 of 5
(3,666 Views)

Very neat and I could see using this.  That being said have you thought about making it into a right-click function too?  I feel like this could be useful since this can provide the context of Create >> Value Change Event but that menu item might not need to show up if indicators are selected.  And besides that I already have a CTRL+E QD (Explorer) that I use pretty often.  We can all admit the QD shortcuts are getting cluttered and while this is useful, the majority of the VIs I write I wouldn't use this on, so maybe a sub menu item would be more appropriate.  Still kudo'd and love it.

0 Kudos
Message 2 of 5
(3,656 Views)

I didn't think of making it into a right-click function, mostly because (like you) the majority of VIs I create don't have interactive front panels with event structures, and I prefer to keep my menus slim since I see them all the time.  Quick-drop, on the other hand, while I may use it a fair amount, it doesn't show you the plugin names unless you click a couple of things.  

 

If someone feels like it they are certainly more than welcome to create a version that puts itself in the right-click menu by copy-pasting the relevant code from this one.

 

As for the shortcut, I suppose it could also be Control-V (for Value change) or some other key... how many letters do you have left?  I've just added this one plus two others to the basic set that came with LV, so I had plenty...

0 Kudos
Message 3 of 5
(3,645 Views)

@Hooovahh wrote:

That being said have you thought about making it into a right-click function too?


Darin already has something along these lines.  Have not looked to see if it works on multiple controls though: Create Event


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
(3,617 Views)

Apparently I'm really forgetful...

 

Lets see, I use M, A, F, I, T, E, O, Q, R, P, B, D, W.  To be fair a couple of those I don't use often and should probably remove them.  And also there are times that I would want to paste text into my QD window using the V for paste.  I had that complaint for the Viewpoint SVN toolkit which added a QD function using the V which I learned as soon as I tried to paste in there.

0 Kudos
Message 5 of 5
(3,613 Views)