Controls[] question
Hallo, say I have a VI with some controls and indicators. If I get the VI's panel refnum and then the Controls[] property I get the array of references. But which array element belongs to which control/indicator of the referenced VI. Is there a way to retrieve an array or cluster with names information, or do I have to scan the references for the name of the referenced control/indicator? That would be some cumbersome. Thanks Oliver Friedrich
Re: Controls[] question
IMHO, scanning controls[] references for a control with a specific name is absolutely natural solution and I don't see any good alternatives. If you require to perform this operation frequently you can always construct your own subvi, and this will be for sure really handy.
Re: Controls[] question
And just to answer your question, the Controls[] property generates the references in the 'Z' order of the controls on the panel. So if you really wanted to, you could use the Move to Front, Move to Back feature and set the order the the references will be generated. Though I'm sure you'll find it much easier just to search for the needed control by it's label since the Z order can change if you're not carful. Ed