leonucadomi Posted August 28 Posted August 28 (defun c:E (/) (setq old_err *error*)(defun *error* ( a / )(princ "") (setq *error* old_err)(princ)) (repeat 1000 (command "_erase" "\\" "") );repeat (princ) );fin defun hello all: I use this routine to delete continuously and use "repeat" Is there any other way to make the routine repeat? without using "repeat" thanks for yours comments Quote
exceed Posted August 29 Posted August 29 (edited) ; have to press the space bar after each selection. (defun c:E ( / ss ) (while (= 1 1) (if (setq ss (ssget "_:L")) (command "_.erase" ss ""))) (princ) ) ; Once selected, it will be deleted immediately. ; But this can't modify the selection set. (defun c:EE ( / ss ) (while (= 1 1) (if (setq ss (ssget "_:S:L")) (command "_.erase" ss ""))) (princ) ) I prefer to just press the Delete key on my keyboard. Edited August 29 by exceed 1 Quote
Steven P Posted August 29 Posted August 29 (edited) For single entity selection only: (defun c:test ( / MyEnt ) (while (setq MyEnt (car (entsel "\nSelect entity to delete"))) (command "erase" MyEnt "") ) ; end while (princ "OK") (princ) ) For multiple entity selections: (defun c:test ( / MyEnt ) (princ "\nSelect entity to delete") (while (setq MyEnt (ssget)) (command "erase" MyEnt "") ) ; end while (princ "OK") (princ) ) I also prefer to just press the Delete key on my keyboard. Edited August 29 by Steven P 2 1 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.