lamensterms Posted September 18, 2013 Share Posted September 18, 2013 (edited) Hey guys, I'm just having a few issues with an error trapper in a MIRROR LISP routine I have. Just wondering if someone wouldn't mind taking a quick look. The error trapper works OK for an ESC at most steps through the routine, but it seems to fail after the line I have highlighted bold/blue in the code below: (defun err (s) (command "u") (prompt "\n*Program Terminated*") (setq *error* exi) (princ) ) (defun c:mi ( / MIss MIpt1 MIpt2 OROS) (SETQ OROS (GETVAR "OSMODE")) (SETQ ORORT (GETVAR "ORTHOMODE")) (COMMAND "undo" "BE") (SETVAR "OSMODE" 0) (SETVAR "ORTHOMODE" 1) (SETVAR "cmdecho" 0) (COMMAND "undo" "END") (setq exi *error*) (setq *error* err) (setq MIss (ssget)) (setq MIpt1 (getpoint)) (command "ucs" "O" MIpt1) [b] [color="blue"](setq MIpt2 '( 0 0 0))[/color][/b] (command "mirror" MIss "" MIPT2 pause pause) (command "ucs" "P") (SETVAR "OSMODE" OROS) (SETVAR "ORTHOMODE" ORORT) (SETVAR "cmdecho" 0) (princ) ) If I hit ESC anytime after the line in blue... the error trapper doesn't seem to activate. I haven't really had much experience with error handling in the past. To be honest, I've had some bad experiences with UNDO>MARK/BACK resulting in everything in the session being undone, and have been scarred off (UNDO>BACK frightens me, haha). Looking forward to hearing back. Thanks for any help. Edited September 18, 2013 by lamensterms Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.