(vmon)
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))
(defun c:lkrg ()
   (setq b1 (getpoint "\n input point ?"))
   (setq x1 (eval (car b1)))
   (setq y1 (eval (cadr b1)))
   (setq od (getreal "\n outside diameter (od) ?"))
   (setq id (getreal "\n inside diameter (id) ?"))
   (setq h (getreal "\n heigh (H) ?"))

   (setq h1 10)
   (setq h2 10)
   (setq cf1 1)
   (setq lh (- h h1))
   (setq rh (- h h2))
   (setq hh (- h h1 h2))
   (setq od/2 (/ od 2))
   (setq id/2 (/ id 2))

   (setq p1 (list (+ x1 od/2) (+ y1 h1)))
   (setq p2 (list (- x1 od/2) (+ y1 h1)))
   (setq p3 (list (- x1 od/2) (- y1 lh)))
   (setq p4 (list (+ x1 od/2) (- y1 lh)))
   (setq p5 (list (+ x1 id/2) (- y1 lh)))
   (setq p6 (list (+ x1 id/2) (- y1 hh)))
   (setq p7 (list (- x1 id/2) (- y1 hh)))
   (setq p8 (list (- x1 id/2) (- y1 lh)))
   (setq p9 (list (+ x1 id/2 rh) (+ y1 h1)))
   (setq p10 (list (- x1 id/2 rh) (+ y1 h1)))
   (command "pline" p1 "w" "0" "0" p2 p3 p4 "c" "")
   (command "pline" p5 "w" "0" "0" p6 p7 p8 "c" "")
   (command "line" p6 p9 "")
   (command "line" p7 p10 "")
   (command "chamfer" "D" cf1 cf1 "")
   (command "chamfer" "P" p1 "")
 )
