01-21-2014 08:12 AM
I have about 50 controls/indicators on a tab of a VI. Based on user selection of a radio button, I need to show/hide a subset of these controls/indicators. Additionally, I'm writing values to the Val(Sgnl) property of several of them.
Right now, the only way I know how to do this, is to right click on a single control, select Property->Visible or Property->Val(Sgnl), and then wire up that reference like I want it. Is there a way to select multiple controls/indicators at once so that it will automatically create the 50 property nodes that I want?
I'm using them inside a case structure, so it's like, if case==X, then show/hide these and write these values to these others...so to repeat this for 50 controls, times however many cases, is getting redundant...
Thanks
01-21-2014 08:25 AM - edited 01-21-2014 08:26 AM
Not that I know of. But a little less labor intensive possibility is to create references to all or groups of controls, which can be done by selecting a bunch of them on the diagram and "Create:Reference", group them into an array(s), feed the array(s) into the appropriate case, handle them in there (i.e. feed the array of specific control refs into a FOR loop which has a property node for setting control visibilty).. "Ben" had some articles on handling user interface components, you may be able to find them with a search. It is labor intensive, but there are tricks to save some of that.
01-21-2014 08:50 AM
You may find this module interesting. It manages a group of control references. You can add, delete, or clear the references in the group. Right now it supports enabling or disabling the current group, but you can add new functions as needed. You begin by loading the manager with a list of references. Then you can perform operations on that list.
All the best.
01-21-2014 08:56 AM
You can place the controls/indicators in clusters and change visibility on the groups all at once.
/Y
01-21-2014 10:22 AM - edited 01-21-2014 10:22 AM
One approach is that you can select the controls 'en masse' and turn a selection on / off using a simple array of names.
01-23-2014 04:00 PM
@NeilR wrote:
One approach is that you can select the controls 'en masse' and turn a selection on / off using a simple array of names.
This approach is very neat in that you can use string wild cards if your controls are named a way that regular expression can find them. Lets say I have 20 boolean controls all named "Boolean XX". I can setup a search to find all controls whos name starts with "Boolean " and disable/enable them all. This can be a little more difficult for new developers to debug because you will see controls change state, but when you right click and choose Find Property Nodes or References there won't be any found because you are finding them dynamically. So be causious and document well where you are changing controls this way.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
10-23-2024 08:40 AM - edited 10-23-2024 08:41 AM
Following this nice idea, I need to control cursors (make them visible/ unviable) for around 100 graphs on the front panel. Is it possible?
thank уou
10-23-2024 08:49 AM
10-23-2024 09:06 AM
Something like this should work, providing you have created a valid cursor for each graph and the graphs are all named 'Waveform Graph n'
But as Gerd has pointed out ... 100 graphs ? Seems a bit busy !
10-23-2024 09:28 AM
yes, correct. ) actually 180