(defun try-getbox (e / en i l max1 min1 pt1 pt2 sn tx1 tx2 ty1 ty2 tye x1 x2 y1 y2)
(setq tye(type e))
(cond
((= 'VLA-object tye)
(vla-GetBoundingBox e 'p1 'p2)
(setq min1 (vlax-safearray->list p1))
(setq max1 (vlax-safearray->list p2))
(list min1 max1)
)
((= 'ENAME tye)
(try-GetBox (vlax-ename->vla-object e))
)
((or(= 'LIST tye)(= 'PICKSET tye))
(if (= 'PICKSET tye)(setq e (repeat (sslength ss)
(setq l(cons (vlax-ename->vla-object(ssname ss(setq i(1+ i)))) l))
)))
(if (= ENAME(type(car e)))(setq e(mapcar 'vlax-ename->vla-object e)))
(vla-getboundingbox (car e) 'pt1 'pt2)
(setq
pt1(vlax-safearray->list pt1)
pt2 (vlax-safearray->list pt2)
tx1 (car pt1)
ty1 (cadr pt1)