- (defun c:tt ()
- (defun mimx (s1 / p1 p9)
- (vla-getboundingbox (vlax-ename->vla-object s1) 'p1 'p9)
- (list (vlax-safearray->list p1) (vlax-safearray->list p9))
- )
- (if (and (setq s1 (car (entsel "\n选择图块: ")))
- (= (cdr (assoc 0 (entget s1))) "INSERT")
- (setq bk (cdr (assoc 2 (entget s1))))
- (setq ss (ssget "x" (list (cons 2 bk))))
- )
- (progn
- (setq i -1)
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq ptn (mimx s1)
- p1 (car ptn)
- p2 (cadr ptn)
- )
- (command "circle" "2p" "non" p1 "non" p2)
- )
- )
- )
- (princ)
- )
|