Donald Varino
Usenet Archive
- Joined
- Jan 21, 2001
- Messages
- 26
- Reaction score
- 0
How can I get this routine to allow multiple blocks deletions? I want to be able to type in more than 1 block at the prompt. Better yet I would like for this routine to gather up all of the blocks inserted in the drawing, make a list of them through a dialog and I can multiple select them from there to delete them.... Any help would be greatly appreciated.
(Setq N (Strcase (Getstring "\n\nEnter block name to delete ... "))) (Setq A 0) (Setq E (Entnext)) (While E (If (= N (cdr (Assoc 2 (Entget E))))(progn (Entdel E) (Setq A (1+ A)) ) ) (Setq E (Entnext E))) (Prompt "\n") (prompt (Itoa A)) (prompt " blocks deleted"\n)
(Princ)
Thanks,
Don
(Setq N (Strcase (Getstring "\n\nEnter block name to delete ... "))) (Setq A 0) (Setq E (Entnext)) (While E (If (= N (cdr (Assoc 2 (Entget E))))(progn (Entdel E) (Setq A (1+ A)) ) ) (Setq E (Entnext E))) (Prompt "\n") (prompt (Itoa A)) (prompt " blocks deleted"\n)
(Princ)
Thanks,
Don