Actually PJM, you should be able to apply the "Reinit to Dflt" method just as Glenn 
describes. Glenn, it's possible that in your
implementation, one of the controls cannot be set to default. This cause an error 
which propogates to other control methods down the
chain. I've attached a link to an image which describes one method that I use for 
applying properties and methods to front panel
references. Maybe this will help:

<http://lavausergroup.org/labviewimages/reinit_to_default.gif>

Michael Aivaliotis
<http:/forums.lavausergroup.org>

=SNIP=
It is my understanding that the Node "Reinit to Dflt" applies to every 
controls/indicator in the panel. In the past, my approach was
to get the value of the controls/indicators I do not want to reset (usually in variant 
or flatten string), then reset everything
then put back the cached value I did not want to reset in the first place. Of course I 
did never had 50 of them !. 
I now try to avoid using "Reinit to Dflt" if possible.

PJM


"R. Glenn Givens" <[EMAIL PROTECTED]> wrote:
Friends
I have a VI with 100 controls that the user can manipulate. Then there are
around 50 indicators and controls that display calculations or are used for
house-keeping (some will eventually be made invisible when I finish the VI).
So I have a button called "Restore Defaults". When the user clicks it, I get
the VI Property "Panel" (panel's reference #) and I feed that to Pnl
Property "Controls" which I feed to a For Loop with an Invoke Node "Reinit
to Dflt" inside. Unfortunately, this restores the values to the defaults for
all controls and indicators. So I thought I would make an array of the
references of the 50 indicators & controls that I didn't want to restore and
just check inside the For Loop if the control in question should be restored
or not. But still, all 150 values are restored.

What is the best way to do this? Make an array of all the controls I *do*
want to restore? For some reason, the Build Array node has coercion dots
where the reference comes into it.


R. Glenn Givens P.Eng.
Innovention Industries Inc.
Burlington, ON, Canada
www.innovin.com



Reply via email to