I've found the reactors for resetting the osmode to be quite annoying and it's not that difficult to code your *error* sub to reset everything accordingly.
For example:
- (defun c:TEst (/ *error* #Osmode #Pnt1 #Pnt2);;; error handler (defun *error* (#Message) (and #Osmode (setvar 'osmode #Osmode)) (and #Message (not (wcmatch (strcase #Message) "*BREAK*,*CANCEL*,*QUIT*")) (princ (strcat "\nError: " #Message)) ) ;_ and ) ;_ defun (setq #Osmode (getvar 'osmode)) (setvar 'osmode 4105) (and (setq #Pnt1 (getpoint "\nSpecify first point: ")) (setq #Pnt2 (getpoint #Pnt1 "\nSpecity next point: ")) (command "_.line" "_non" #Pnt1 "_non" #Pnt2 "") ) ;_ and (and #Osmode (setvar 'osmode #Osmode)) ;; or you can type: (*error* nil) (princ)) ;_ defun
|