> I am writing a program in which I need a lot of buttons to appear and
> dissappear at certain times. Namely, I need about 80 to 100 items to
> become invisible every time one of about 20 buttons on my front panel
> is pressed. I'd prefer to find a way to do this without having to make
> 20 copies of the 80 to 100 property nodes that its already going to
> require to make the program. So is there a way I can use variables or
> something else to allow me to reuse the code that will make the items
> all non visible?

As mentioned in the other post, you will want to use references to allow 
for convenient access to the majority of the control.  I'm not certain 
that I understand your panel, but you should first build up the 
references in an array.  There are a couple ways to do this.  You can 
popup on the controls and indicators and create lots of reference nodes 
and wire those into a cluster or array, or you can use the VI Front 
Panel Controls[] to get the array to all controls and use the name, 
location, type, or other attributes to build up the array of just the 80 
elements you want.  You can then loop through setting the property on 
each element of the array.  If it is a different eighty controls for 
different groups, then I'd make different arrays or a 2D array with rows 
representing the groupings.

Also note that the attributes or properties are presented at different 
class levels, and for visibility, it is available at a very low class 
level and shouldn't need any casting.  For higher properties, you may 
need to cast the control reference before setting the property.

If this doesn't make sense or doesn't work, please ask again.

Greg McKaskle


Reply via email to