LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Front Panel Control indexes

Is there an easy way to find the Control Indexes of all the Front Panel controls?  I know I can create do this individually for each control using the Control Index property node.  I was wondering if there was a function or a way to read all Front Panel Control Indexes a lot more efficiently.

 

Thanks so much!

0 Kudos
Message 1 of 13
(4,228 Views)
Why do you need the indexes? Maybe there's a leaner way aroind the problem.
/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 13
(4,224 Views)

I need to re-initalize all my front panel controls except for a select few.  I was wondering if there was a function or an efficient way to programitically read out all the front panel control references.  I then want to set specific control values to certain values using the "Set Control Values By Index" function.

0 Kudos
Message 3 of 13
(4,213 Views)

How will you identify which ones you don't want to change?  If you're going to do it by their name, this?

 

Example_VI_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 13
(4,202 Views)

Yep, using the control index property node.

0 Kudos
Message 5 of 13
(4,182 Views)
0 Kudos
Message 6 of 13
(4,180 Views)

Picking up on Yamaeda's suggestion, I just wrote a routine that had a Picture control that I wanted to fill the full screen.  At first, I went through and made each control except the Picture invisible.  Then I had an "Aha" moment -- I used the Pane property to get references to all of the controls, made them all invisible, then went through looking for controls whose ClassName was "Picture" (I could have also used the Control name, but this seems more direct) and did what I needed to do with it.  Much neater, no muss, no fuss.

 

BS

Message 7 of 13
(4,168 Views)

Does this do the trick?

 

ControlIndex.png

 

Cheers,

mcduff

Message 8 of 13
(4,161 Views)

Thanks McDuff and Bob_Schor...This information is very helpful!

0 Kudos
Message 9 of 13
(4,105 Views)

@testdesign wrote:

I need to re-initalize all my front panel controls except for a select few.  I was wondering if there was a function or an efficient way to programitically read out all the front panel control references.  I then want to set specific control values to certain values using the "Set Control Values By Index" function.


Then you can invoke the Reinitialize default values and rewrite the select few. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 10 of 13
(4,099 Views)