Take a look at your F_READ statement, it should be
F_READ[ FN=W:\MCL\SHIMSTAK.MCL, FMT="%S", VR="Shim_Stack" ]
^^^^ ^^^^^^^^^^^^
note: %S in quotes and the varable is in quotes with no # or %
I noticed that you used a string var. If you want to use this var in
calculations you may want to make it an integer.
integer:#Shim_Stack
change the %S to %I
Bill Wepking
CAM Programming Mgr
Landis Gardner
-----Original Message-----
From: Michael Senack [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 7:43 AM
To: '[EMAIL PROTECTED]'
Subject: [mfg-smartcam] Reading in a variable
I'm having a bit of trouble reading a variable from an ASCII text file.
Here is the contents of my variable file w:\mcl\shimstak.mcl
4
Here is the contents of the w:\mcl\shimread.mcl macro file that opens,
reads and then closes the w:\mcl\shimstak.mcl file
VAR_REMOVE_ALL[]
string:#Shim_Stack
F_OPEN[ FN=W:\MCL\SHIMSTAK.MCL, TY=R]
F_READ[ FN=W:\MCL\SHIMSTAK.MCL, FMT=%, VR=#Shim_Stack ]
F_CLOSE[ FN=W:\MCL\SHIMSTAK.MCL ]
Once I've executed the w:\mcl\shimread.mcl and do a
Macro, Variables and look at SHIM_STACK variable
it shows nothing.
Why?
I've attached both files.
Regards,
Michael Senack
<<SHIMREAD.MCL>> <<SHIMSTAK.MCL>>
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================