- (defun c:zy (/ ss r i minpt maxpt p p_r p_u p_l p_d)
- (prompt "\n选择对象")
- (if (and (setq ss (ssget))
- ;(setq r 0.33)
- )
- (repeat (setq i (sslength ss))
- (setq i (1- i) a (vlax-ename->vla-object (ssname ss i)))
- (setq rr (vla-get-radius a))
- (vla-getboundingbox a 'minpt 'maxpt)
- (mapcar 'set '(minpt maxpt) (mapcar 'vlax-safearray->list (list minpt maxpt)))
- (setq p (mapcar '(lambda (x y) (/ (+ x y) 2.0)) minpt maxpt))
- (entmake (list '(0 . "CIRCLE") (cons 10 p) (cons 40 (/ rr 3))))
- (entmake (list '(0 . "line") ))
- )
- )
- )
|