|
[code](defun c:tt(/ *acad* *doc* *docs* *ms* cx-isdynamic i)
(defun cx-Isdynamic ( obj )
(and (vlax-property-available-p obj 'isdynamicblock)
(= :vlax-true (vla-get-isdynamicblock obj))
)
)
(vl-load-com)
(setq
*ACAD* (vlax-get-acad-object)
*DOC* (vla-get-ActiveDocument *ACAD*)
*DOCS* (vla-get-Documents *ACAD*)
*MS* (vla-get-modelSpace *DOC*)
)
(setq i 0)
(vlax-for x *MS*
(if (cx-Isdynamic x)
(progn
(vla-Explode x)
(vla-Delete x)
(setq i(1+ i))
)
)
)
(if(> i 0)
(alert(strcat "一共炸开" (itoa i) "个动态块."))
(alert"无动态块.")
)
(princ)
)[/code] |
|