PDA

View Full Version : Erase all copies of a selected block and it's attributes should it have any


stephen.coff
2007-03-24, 09:34 AM
Guys,
Does anyone have a LISP Routine that that will erase all copies of a selected block and it's attributes should it have any ?

Often Architects place section arrow blocks on there drawings. The section arrow has attributes to show the section name eg "A" and usually the drawing number the section is on eg "04".

I wish to be able to run the routine and be prompted to select "1 Section Arrow" and all section arrows be erased along with the attributes attached.

Not sure how big of an ask this is though figure it was worth the try.

Regards

Stephen

aaronic_abacus
2007-03-25, 12:43 AM
;This autolisp program erases all blocks named through selection of one.



(DEFUN C:EAB ()
(PROMPT "\n*ERASE ALL BLOCKS* ")
(SETQ EBN (CAR (ENTSEL "\nSelect block for name to be erased: ")))
(SETQ EBNL (ENTGET EBN))
(SETQ EBNLN (LIST (ASSOC 2 EBNL)))
(SETQ EBS (SSGET "X" EBNLN))
(COMMAND "ERASE" EBS "")
(PRINC)
);END EAB

stephen.coff
2007-03-25, 06:01 AM
Aaronic,
Greatly appreciated.
Thank you.

One question.
Will it work with nested blocks or dynamic blocks with visibility states ?
yet to see, will try though.

Regrads
Stephen