[仑通]仑通 21:22:56
(defun c:Get_MinMax( / en vl-en minext maxext)
(vl-load-com)
(setq *acadobject* (vlax-get-acad-object)
*acaddocument* (vla-get-activedocument *acadobject*)
*mspace* (vla-get-modelspace *acaddocument*)
) ;_ Endsetq
(setq en (entsel " lease select a object: "))
(setq vl-en (vlax-ename->vla-object (car en)))
(setq minext (vlax-make-safearray vlax-vbdouble '(0 . 2)))
(setq maxext (vlax-make-safearray vlax-vbdouble '(0 . 2)))
(vla-getboundingbox vl-en 'minext 'maxext)
(list (vlax-safearray->list minext) (vlax-safearray->list maxext))
) ;_ EndDEFUN |