Kelly Posted October 31, 2007 Report Share Posted October 31, 2007 I've had several VIs to hide and/or show and enable and/or disable controls and indicators on the front panel. After some discussion on Info-LabVIEW I cleaned them up and combined them. Here are two VIs. One will disable, disable & gray, or enable selected controls on the front panel of the VI it is used in. The other will hide or show (make invisible or visible) selected controls on the front panel of the VI it is used in. Documentation is on the front panel of these VIs as well as in the description of each control/indicator.Kelly BerschI should have included the fact that these VIs are for LabVIEW 8.2.Kelly 1 Quote Link to comment
Anders Björk Posted November 1, 2007 Report Share Posted November 1, 2007 QUOTE(kbersch @ Oct 30 2007, 11:19 PM) I've had several VIs to hide and/or show and enable and/or disable controls and indicators on the front panel. After some discussion on Info-LabVIEW I cleaned them up and combined them. Here are two VIs. One will disable, disable & gray, or enable selected controls on the front panel of the VI it is used in. The other will hide or show (make invisible or visible) selected controls on the front panel of the VI it is used in. Documentation is on the front panel of these VIs as well as in the description of each control/indicator.Kelly BerschI should have included the fact that these VIs are for LabVIEW 8.2.Kelly Nice Work! Quote Link to comment
Kelly Posted July 12, 2008 Author Report Share Posted July 12, 2008 I've updated my Show/Hide and Enable/Disable controls VIs so they recursively find control refnums. This allows them to now find controls in Tabs and Clusters. You will need to make sure no two clusters/tabs have identically named controls or this will affect all of them. There are two more VIs along with these because they are used in the recursive search. They are modified versions of the "Get controls on tabs.vi" written by Dave A. Graybeal. All four VIs need to be in the same folder. These VIs were written with LabVIEW 8.5.1. Quote Link to comment
JiMM Posted July 12, 2008 Report Share Posted July 12, 2008 QUOTE (kbersch @ Oct 30 2007, 06:19 PM) I should have included the fact that these VIs are for LabVIEW 8.2.Kelly Kelly, I'd be interested in checking out your VIs, but I only go up to LV8.0. Any chance that you could save to 8 and post them? Thanks. Quote Link to comment
Francois Normandin Posted July 12, 2008 Report Share Posted July 12, 2008 Download File:post-10515-1215804026.zip Quote Link to comment
Kelly Posted July 12, 2008 Author Report Share Posted July 12, 2008 I did a little more testing and found a bug in the two support files. Here they are with the fix. Quote Link to comment
Yair Posted July 13, 2008 Report Share Posted July 13, 2008 Kelly, relying on control labels is something I generally find potentially dangerous. A more robust method would be using the control references directly. You can see a quick example here (in 7.1, if memory serves). In actual code, I would probably separate the action from the group input, but it shows the concept well enough. Quote Link to comment
rkesmodel Posted June 9, 2009 Report Share Posted June 9, 2009 Great work Kelly. I have used your earlier version (before the cluster and tab controls were added. However, how do you generate the list of controls? Roy Quote Link to comment
Norm Kirchner Posted June 9, 2009 Report Share Posted June 9, 2009 I don't want to burst your bubble on some of your code but you should checkout the VIs in C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\Utility\traverseref.llb there are two top level VIs that allow you to farm an array of all references of any type of LV object w/out worrying about traversing structures yourself. In the end your code would still do the same thing, but be more robust and flexible for different types. Quote Link to comment
Darren Posted June 10, 2009 Report Share Posted June 10, 2009 QUOTE (Norm Kirchner @ Jun 8 2009, 04:10 PM) I don't want to burst your bubble on some of your code but you should checkout the VIs in C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\Utility\traverseref.llb More details about the traverse VI http://labviewartisan.blogspot.com/2009/06/labview-scripting-tip-1-power-of.html' rel='nofollow' target="_blank">here. -D 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.