; ºí·°³»ÀÇ À¯·É°´Ã¼ »èÁ¦
; ÀåÈïÃß¾ï´Ô Á¦ÀÛ (defun c:DelEEinBlock ( / oDocument entity oBlock TextString )
(vl-load-com) (setq oDocument (vla-get-activedocument (vlax-get-acad-object))) (if (setq entity (car (entsel "nºí·°À» ¼±ÅÃ: "))) (if (= (cdr (assoc 0 (entget entity))) "INSERT") (progn (setq oBlock (vla-item (vla-get-blocks oDocument) (vla-get-name (vlax-ename->vla-object entity)))) (vlax-for obj oBlock (if (or (= (vla-get-objectname obj) "AcDbText") (= (vla-get-objectname obj) "AcDbMText")) (progn (setq TextString (vl-string-right-trim " " (vl-string-left-trim " " (vla-get-textstring obj)))) (if (or (= TextString "") (= (substr TextString 1 1) "\")) (vla-delete obj)) ) ) ) (vlax-for obj oBlock (if (or (= (vla-get-objectname obj) "AcDbLine") (= (vla-get-objectname obj) "AcDbPolyline")) (if (<= (vla-get-length obj) 0.00000001) (vla-delete obj)) ) ) ) (prompt "nSelected entity is not Block Reference ...") ) ) (princ) ) |