- (defun c:tt ( / box e i ss)
- (defun ebox (e / pa pb)
- (Vlax-Invoke-Method (Vlax-Ename->Vla-Object e ) 'GetBoundingBox 'pa 'pb )
- (setq pa (trans (vlax-safearray->list pa) 0 1)
- pb (trans (vlax-safearray->list pb) 0 1)
- )
- (list pa pb)
- )
- (setq ss (ssget '((0 . "INSERT"))))
- (repeat (setq i (sslength ss))
- (setq e (ssname ss (setq i (1- i)))
- box (ebox e)
- )
- (vl-cmdf "rectang" (car box) (cadr box))
- )
- )
|