;; | ---------------------------------------------------------------------------- ;; | MI_DrawBox ;; | ---------------------------------------------------------------------------- ;; | Function : Draws a rectangular box with the specified width and height, ;; | layer and line thickness. ;; | Arguments: 'CenPt' - Center point of the rectangle ;; | 'Width' - Width of rectangle ;; | 'Height' - Height of rectangle ;; | 'Layer' - Layer to place it on ;; | 'Wid' - Width of polyline ;; | Returns : None ;; | Updated : August 3, 2005 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun MI_DrawBox ( CenPt Width Height Layer Wid / OS pt1 pt2 pt3 pt3 pt4 cl OS ) (setq OS (getvar "OSMODE")) (setvar "OSMODE" 0) (setq cl (getvar "CLAYER")) (LA_mk_c_lyr Layer "") (setq pt1 (polar CenPt pi (* 0.5 Width)) pt1 (polar pt1 #pb2 (* 0.5 Height)) pt2 (polar pt1 0.0 Width) pt3 (polar pt2 (* 1.5 pi) Height) pt4 (polar pt3 pi Width) ) (command "._Pline" pt1 "_Width" Wid Wid pt2 pt3 pt4 "_Close") (LA_mk_c_lyr cl "") (setvar "OSMODE" OS) (list pt1 pt2 pt3 pt4) )