Here is another erase routine that lets you select only one object at a time but like the previous post, it erases the selected object and then continues the erase command.
My ultimate goal would be to combine these 2 routines into one.
;; erase single ;; found at http://cadpanacea.com/node/309#comment-3974 ;; (defun c:es (/ ent ecnt eprompt) (setvar "ERRNO" 0) (setq eprompt "\nSelect object: " ecnt 0 ) (while (or (setq ent (entsel eprompt)) (eq 7 (getvar "errno")) ) (cond ((= ent "Undo") (command "u") (setq ecnt (1- ecnt)) ) ((= (type ent) 'list) (command "erase" ent "") (setq ecnt (1+ ecnt)) ) (t nil) ) (setvar "ERRNO" 0) (if (not (zerop ecnt)) (progn (setq eprompt "\nUndo/<Select object>: ") (initget "Undo") ) (setq eprompt "\nSelect object: ") ) ) (princ) )