Craig Graham wrote:
>
> I'm in the process of cobbling together a VI that takes a VI name and a
> control name and returns a reference to that control, in LV6. Firstly, I've
> not dug deeply through the LV6 directory so am I duplicating an existing
> function?
>
> Secondly, I'm tackling the problem by opening a reference to the named VI,
> getting a reference to the front panel and then getting an array of
> references to the controls on the front panel from the relevant property of
> the "panel" object. I then go through the array of controls checking the
> "Label.Text" property to find the one I want. However, am I right in
> thinking that I have to make sure I close all of the other unwanted
> references in this array behind me? If so, I could be opening m
any tens of
> references for a complex panel and having to cycle through them all closing
> them again. This seems inelegant and inefficient- is there a better way?
Hm, I didn't have this problem. Did you tried to get references from
another vi, or from the same one?
If not, try to open reference from another vi. In manuals they say that
there is no need to close references, but you can. I've tried both ways
and all works, but from separate vi.
It seems that opening reference from the diagram to front panel of the
same vi causes troubles some times.
There is references tree drawing in online help. Very useful to
understand FP classes structure.
May be this will help a little,
Regards,
--
Sergey Krasnishov
____________________________________
Automated Control Systems
National Instruments Alliance Member
Moscow, Russia
sergey_acs@levsha.ru
http://acs.levsha.ru