I'm not sure what your looking for as an end result, so here are 2
variations to try.
The first option displays 2 dialog boxes. The first dialog box notifies the
user of the error and gives the option for the user to continue or cancel.
If the user selects "Cancel" the macro will terminate. If the user selects
"OK" the second dialog box is then displayed prompting the user to input a
new value. This loop will continue until the user either inputs a valid
value or selects "Cancel".
// check DECIMAL to see if it is between 1 and 4
WHILE(#DECIMAL<1, OR #DECIMAL>4)
// notify user of error and include cancel option
PAUSE[TX="ERROR: The number of decimal places must be between 1 and
4", PT=1]
// prompt user for new value for DECIMAL
PROMPT[TX="Enter the number of decimal places", VN="DECIMAL"]
ENDW
The second option displays only 1 dialog box. The dialog box notifies the
user of the error and prompts the user to input a new value. The user is
given no option to cancel. This loop will continue until the user inputs a
valid value.
// check DECIMAL to see if it is between 1 and 4
WHILE(#DECIMAL<1, OR #DECIMAL>4)
// notify user of error and prompt for new value for DECIMAL, no
cancel option
PROMPT[TX="ERROR: The number of decimal places must be between 1 and
4\n
\n
Enter the number of decimal places", VN="DECIMAL"]
ENDW
=============================================
Fred Lauzus, CAM Programming Coordinator
High Steel Structures, Incorporated
mailto:[EMAIL PROTECTED] http://www.highsteel.com
=============================================
-----Original Message-----
From: Mike Senack [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 02, 2000 1:26 AM
To: '[EMAIL PROTECTED]'
Subject: [mfg-smartcam] Macro help with V11.5
// check DECIMAL variable
//
WHILE(#DECIMAL ??? )// check DECIMAL to see if it is between 1 and 4
PAUSE[TX="ERROR: The number of decimal places must be between 1 and 4",
PT=1] // Include box cancel option
#DECIMAL=1000000 // this resets DECIMAL variable to an unknown value
ENDW
//
Above is a macro I'm writing for SmartCAM V11.5. The problem I'm having
is figuring out how to check the variable #DECIMAL to see if it's a number
from one to four in the WHILE line. Any suggestions?
Thanks
======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================