|
- ;;动态块改为普通快 By Gu采用xl 2013.11.13
- (defun c:DZB (/ cnt)
- (if (ssget (list '(0 . "INSERT") (cons 410 (getvar 'CTAB))))
- (progn
- (setq cnt 0)
- (vlax-for obj
- (vla-get-activeselectionset
- (vla-get-activedocument (vlax-get-acad-object))
- )
- (if (and
- (vlax-property-available-p obj 'isdynamicblock)
- (eq :vlax-true (vla-get-isdynamicblock obj))
- )
- (progn
- (setq cnt (1+ cnt))
- (vla-ConvertToAnonymousBlock obj)
- )
- )
- )
- (princ (strcat "\n***共修改 " (itoa cnt) " 个动态块***"))
- )
- )
- (princ)
- )
复制代码 |
|