Guest looseLISPSsinkSHIPS Posted February 24, 2010 Posted February 24, 2010 Hi I have the following lisp, which I constructed to temporarily reset the OSMODE variable whilst a function is executed, however because of the circumstance I need this type of function but using a DEISEL macro… DEISEL macros aren’t my strong point, could somebody assist in this CODE STARTS HERE (defun C:Max ( ) (setq temperr *error*) (setq *error* trap1) (setq ERRORSNAP (getvar "osmode")) (setq MYSNAP (getvar "osmode")) (command "osmode" "4241") (command "wood") (while (= (logand (getvar "cmdactive") 1) 1) (command pause) ) (setvar "osmode" MYSNAP) ) (defun trap1 (errmsg) (setvar "osmode" ERRORSNAP) (setq *error* temperr) (princ "\nFunctie Geannuleerd... ") (terpri) (prompt errmsg) (princ) ) CODE ENDS HERE Also if error handling is not possible within DEISEL macros then I will settle for one without. Thanks- Quote
Lee Mac Posted February 24, 2010 Posted February 24, 2010 Firstly, read this: http://www.cadtutor.net/forum/showthread.php?t=9184 Quote
Lee Mac Posted February 24, 2010 Posted February 24, 2010 Here is a DIESEL reference, but I don't think you can have a while in DIESEL... I hope I am mistaken. :wink: Quote
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.