I prefer to use a PROMPT[] statement or a CTK dialog box instead of relying on the default user prompts generated when the macro encounters an unknown variable.
The advantages of using PROMPT[] statements: 1. It allows you to display specific text when prompting for a value instead of "Enter the value for VAR:" 2. Prompts for the value regardless if the value of the variable has been previously defined. No need to remove all variables at the start of the macro. 3. Gives you the option of accepting the current value or entering a new one. 4. Has the option of displaying the variable name as well. 5. Offers the option to accept the value and continue or terminate the macro using "Ok" and "Cancel" buttons. Depending on how versatile you need the macro to be, you could create custom dialog boxes to serve as prompts using the Visual Customization Toolkit (CTK). The advantages of using a custom dialog boxes: 1. It allows you to display specific text when prompting for a value instead of "Enter the value for VAR:" 2. Prompts for the value regardless if the value of the variable has been previously defined. No need to remove all variables at the start of the macro. 3. Gives you the option of accepting the current value or entering a new one. 4. Allows the entry of up to 36 variables from a single dialog box. A single dialog box could replace 36 individual prompts. 5. Allows the use of drop down lists, radio buttons and check boxes to enter integer values. 6. Enables the user to use the mouse and select values by "snap" functions. 7. Allows the use of the "File Select" function to pick file names of existing files. 8. Offers the option to accept the value and continue or terminate the macro using "Ok" and "Cancel" buttons. The dialog boxes are a little more work but greatly improve ease of use for the operator, especially if its me. ============================================= Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ============================================= -----Original Message----- From: Michael Senack [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 9:24 AM To: '[EMAIL PROTECTED]' Subject: [mfg-smartcam] Exiting a mcl ? // Advanced_Wedm 11.5 Windows 10/16/98 16:48:10 Macro File // w:\mcl\TAP.mcl // CREATED: 02/26/01 // // VAR_REMOVE_ALL[] //PAUSE[TX="The so far so good macro pause!", LR=10, LC=5, SR=2, SC=40, PT=1] #Z1=#Z1 #Z2=#Z2 #HOLEDIA=#HOLEDIA #TAPDIA=#TAPDIA #TAPDEPTH=ABS(#TAPDEPTH) ELMT_SEQ[BA=1, EL="TOTEL()", ME=1] COLOR_CHG[CO=5, TY=1, TL=13, ST=0]// hole layer with solid lines ON_LAYER[LY=13, WP="XY_PLANE", LV=#Z2, PT=#Z1] ARC[DR=0, XC=0, YC=0, RA=#HOLEDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2, LV=#Z2] COLOR_CHG[CO=5, TY=1, TL=12, ST=1]// tap layer with broken lines ON_LAYER[LY=12, WP="XY_PLANE", LV=#Z2, PT=#Z1] ARC[DR=0, XC=0, YC=0, RA=#TAPDIA/2, AS=0, AE=0, SE=2, SS=2, SI=2, SC=2, LV=-#TAPDEPTH] MAC_EXE[FN="w:\\mcl\\u.mcl"] BOX_GRP[AR=0, X1=-0.16829803, Y1=-0.00715354, X2=-0.05904404, Y2=-0.08909403, PC=0] AUTO_ANSWER[AA="OK"] SAVE[FN="w:\\JOB\\tap", FT=3, GS=0, WP="XY_PLANE"] AUTO_ANSWER[AA="OFF"] GRP_DELETE[] ELMT_SEQ[BA=1, EL="totel()", ME=1] MERGE[FN="w:\\JOB\\tap", FT=2, XS=#X1, YS=#Y1, ZS=#Z1] ELMT_SEQ[BA=1, EL="totel()", ME=1] MERGE[FN="w:\\JOB\\tap", FT=2, XS=#X2, YS=#Y2, ZS=#Z1] ELMT_SEQ[BA=1, EL="totel()", ME=1] MERGE[FN="w:\\JOB\\tap", FT=2, XS=#X3, YS=#Y3, ZS=#Z1] <--- how do I stop the mcl file here? ELMT_SEQ[BA=1, EL="totel()", ME=1] MERGE[FN="w:\\JOB\\tap", FT=2, XS=#X4, YS=#Y4, ZS=#Z1] Working on converting my SC 4.5 macros to SC 11.5 mcl files. So far so good... The problem I'm having with this mcl file is at the end, where I prompt for the XS= and YS= co-ordinates. In the SC 4.5 mac file all I had to do to end the macro was hit the Esc key. How do I accomplish this in the above mcl without adding any extra prompts to carry on or exiting? Regards, Michael Senack, X354 Your local friendly neighborhood CNC Programmer ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ====================================================================== ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
