Casey Posted June 29, 2018 Report Share Posted June 29, 2018 I'd like to know how to quickly create a local variable from a property node or vice versa. I know it can be done by either right clicking on the terminal and selecting Create/ Local Variable. It can also be done by creating a local variable from the menus and then assigning it to the correct control. In practice, if I have a property node of a given control and I want to make a local variable right next to it, the I 1) right click on the property node and select Find/ Terminal, then 2) right click on the terminal and Create/ Local Variable, then 3) Navigate with my Local Variable back to where I started. I'd like a faster way. For example, if there's a local variable I want to duplicate, I can just hold down control and left click & drag to get another local (already assigned to the same control). Is there something similar to make local variables from property nodes and vice versa? Quote Link to comment
smithd Posted June 30, 2018 Report Share Posted June 30, 2018 (edited) https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/Replace-Value-Property-with-Local-Variable-llb/ta-p/3538829 you may wish to edit it to support all property nodes, not just "value" props, but thats not hard (its most likely just deleting a bunch of code that filters the results). start here: https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/NIWeek-2015-Presentation-on-Shortcut-Menu-Plug-ins/ta-p/3521526 install: https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/How-to-install-plug-ins-that-you-download/ta-p/3517848 Edited June 30, 2018 by smithd Quote Link to comment
Casey Posted July 11, 2018 Author Report Share Posted July 11, 2018 (edited) Wow. That's it. Thanks. The NI Week presentation goes into the needed detail and "teaches me to fish." I've still got a few projects in older versions (as far back as Labview 2011). Any advice for versions older than 2015? Edited July 11, 2018 by Casey Quote Link to comment
jacobson Posted July 11, 2018 Report Share Posted July 11, 2018 You could just gut out the main scripting code and put it into something like the Scripting Springboard NormK has posted. Instead of a right click you select the property nodes or local variables and click a floating button that will execute the scripting routine on those objects. https://forums.ni.com/t5/LabVIEW-APIs-Blog/Automating-LabVIEW-Development-with-the-Scripting-Springboard/ba-p/3475829 Quote Link to comment
smithd Posted July 12, 2018 Report Share Posted July 12, 2018 You could also just make a quick drop shortcut. quick drop itself uses a method (can't remember the name) to pop an item onto your mouse cursor. You could take the scripting code from the right click tool, look for any property nodes, and if you find one add a local variable onto the mouse pointer. https://labviewartisan.blogspot.com/2012/11/getting-started-with-custom-quick-drop.html Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.