给你一段代码,自己好好研究一下,代码看懂了,你就知道怎么做了!
- ;;功能: 解除标注与实体的关联
- (defun c:rda ( / d e i s )
- (if (setq s (ssget "_:L" '((0 . "*DIMENSION") (102 . "{ACAD_XDICTIONARY") (102 . "{ACAD_REACTORS"))))
- (repeat (setq i (sslength s))
- (setq e (entget (ssname s (setq i (1- i)))))
- (dictremove (setq d (cdr (assoc 360 e))) "ACAD_DIMASSOC")
- (if (null (dictnext d t))
- (vla-delete (vlax-ename->vla-object d))
- )
- (vla-delete (vlax-ename->vla-object (cdr (assoc 330 e))))
- )
- )
- (princ)
- )
|