Tags |
(This content has not been tagged yet)
|
![]() |
Oct 30 2007, 10:19 PM
Post
#1
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 23-March 04 From: Mesa, Arizona, USA Member No.: 323 Using LabVIEW Since:2001 LV:8.2.1 ,6.0.2 ,.
|
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 Bersch[attachment=7451:Disable_...Controls.vi][attachment=7452:Hide_Show_Controls.vi]I should have included the fact that these VIs are for LabVIEW 8.2.Kelly
|
||
|
|
|||
| Ad |
Oct 30 2007, 10:19 PM
Post
#
|
||
|
|
|
||
|
|
|||
Oct 31 2007, 09:57 AM
Post
#2
|
|||
|
Very Active Member Posts: 119 Joined: 31-July 06 From: Stockholm Member No.: 5713 Using LabVIEW Since:1996 LV:8.5 ,7.1.1 ,8.0.1
|
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 Bersch[attachment=7451:Disable_...Controls.vi][attachment=7452:Hide_Show_Controls.vi]I should have included the fact that these VIs are for LabVIEW 8.2.Kelly Nice Work!
|
||
|
|
|||
Jul 11 2008, 05:57 PM
Post
#3
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 23-March 04 From: Mesa, Arizona, USA Member No.: 323 Using LabVIEW Since:2001 LV:8.2.1 ,6.0.2 ,.
|
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.
Attached File(s)
Disable_Enable_Controls.vi ( 42.72K )
Number of downloads: 111
Hide_Show_Controls.vi ( 38.97K )
Number of downloads: 99
|
||
|
|
|||
Jul 11 2008, 06:53 PM
Post
#4
|
|||
![]() Very Active Member Posts: 93 Joined: 11-October 07 From: Tarboro, NC Member No.: 9577 Using LabVIEW Since:2001 LV:7.1 ,. ,.
|
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. -------------------- Jim
![]()
|
||
|
|
|||
Jul 11 2008, 07:20 PM
Post
#5
|
|||
![]() Extremely Active Premium Member ![]() Posts: 259 Joined: 18-January 08 From: Montréal, Canada Member No.: 10515 Using LabVIEW Since:2000 LV:8.6 ,8.5 ,.
|
|
||
|
|
|||
Jul 11 2008, 07:57 PM
Post
#6
|
|||
![]() Enough LAVA to be dangerous Member Posts: 4 Joined: 23-March 04 From: Mesa, Arizona, USA Member No.: 323 Using LabVIEW Since:2001 LV:8.2.1 ,6.0.2 ,.
|
I did a little more testing and found a bug in the two support files. Here they are with the fix.
Attached File(s)
Get_controls_on_tab.vi ( 44.38K )
Number of downloads: 87
Get_controls_in_cluster.vi ( 39.81K )
Number of downloads: 88
|
||
|
|
|||
Jul 12 2008, 07:38 PM
Post
#7
|
|||
![]() Extwemely Active Premium Member ![]() Posts: 1621 Joined: 23-January 05 From: Here Member No.: 1431 Using LabVIEW Since:2003 LV:8.6 ,7.0 ,.
|
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.
-------------------- More than meets the eye...
|
||
|
|
|||
![]() ![]() |
| Time is now: 22nd November 2008 - 07:40 AM |