(defun c:Dle (/ ext lst s sset lay) (while (null ext) (setvar 'errno 0) (if sset (initget "Undo") ) (setq s (entsel "\nPick An object to Erase[Undo]:")) (cond ((= 7 (getvar 'errno)) (princ "\nMissed.Try again.") ) ((= "Undo" s) (if lst (progn (setq sset (car lst)) (setq lst (cdr lst)) (repeat (sslength sset) (entdel (ssname sset 0)) (ssdel (ssname sset 0) sset) ) ) (princ "\nNothing to Undo.") ) ) ((= 'ename (type (car s))) (setq lay (cdr (assoc 8 (entget (car s))))) (if (/= (getvar 'clayer) lay) (progn (setq sset (ssget "x" (list (cons 8 lay)))) (command "_.ERASE" sset "") (setq lst (cons sset lst)) ) (princ "\nCannot Delete Current Layer.") ) ) ((setq ext t)) ) ) (princ) )
Tuesday, 26 March 2013
Posted by Unknown on 22:33 with No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment