 (defun c:gpb ()
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))

 (defun setup()
   (setq ch (getstring "\n D(20)D(25)D(30)D(35)D(40)D(50)D(60) ?"))

   (setq L (getreal "\n How about the G.P longer ?"))
   (setq n (getreal "\n How about the N. size ?"))

   (setq base (getpoint "\n Where will you put on the G.P ?"))
   (setq x1 (eval (car base)))
   (setq y1 (eval (cadr base)))

   (setvar "cmdecho" 1)
   (while (or (eq ch "20") (eq ch "D20") (eq ch "d20")) (D20))
   (while (or (eq ch "25") (eq ch "D25") (eq ch "d25")) (D25))
   (while (or (eq ch "30") (eq ch "D30") (eq ch "d30")) (D30))
   (while (or (eq ch "35") (eq ch "D35") (eq ch "d35")) (D35))
   (while (or (eq ch "40") (eq ch "D40") (eq ch "d40")) (D40))
   (while (or (eq ch "50") (eq ch "D50") (eq ch "d50")) (D50))
   (while (or (eq ch "60") (eq ch "D60") (eq ch "d60")) (D60))
   (setup)
 )

 (defun D20()
   (setq d 20)
   (setq c 30)
   (setq b 35)
   (setq h 8)
   (setq r 2.5)
   (setup1)
 )

 (defun D25()
   (setq d 25)
   (setq c 35)
   (setq b 40)
   (setq h 8)
   (setq r 2.5)
   (setup1)
 )

 (defun D30()
   (setq d 30)
   (setq c 42)
   (setq b 47)
   (setq h 10)
   (setq r 3.0)
   (setup1)
 )

 (defun D35()
   (setq d 35)
   (setq c 48)
   (setq b 54)
   (setq h 10)
   (setq r 3)
   (setup1)
 )

 (defun D40()
   (setq d 40)
   (setq c 55)
   (setq b 61)
   (setq h 12)
   (setq r 4)
   (setup1)
 )

 (defun D50()
   (setq d 50)
   (setq c 70)
   (setq b 76)
   (setq h 15)
   (setq r 5)
   (setup1)
 )

 (defun D60()
   (setq d 60)
   (setq c 80)
   (setq b 86)
   (setq h 15)
   (setq r 5)
   (setup1)
 )

(defun setup1()
   (if (< l 0) (setq d (* -1 d)))
   (if (< l 0) (setq h (* -1 h)))
   (setq b1 (/ b 2))
   (setq c1 (/ c 2))
   (setq d1 (/ d 2))
   (if (< l 0) (setq r (* -1 r)))
   (setq e (- l r))
   (setq f (- d1 r))

   (setq p1 (list (- x1 b1) y1))
   (setq p2 (list (+ x1 b1) y1))
   (setq p3 (list (+ x1 b1) (+ y1 h)))
   (setq p4 (list (- x1 b1) (+ y1 h)))
   (command "pline" p1 "w" "0" "0" p2 p3 p4 p1 "")

   (setq p11 (list (+ x1 c1) (+ y1 h)))
   (setq p21 (list (+ x1 c1) (+ y1 n)))
   (setq p31 (list (- x1 c1) (+ y1 n)))
   (setq p41 (list (- x1 c1) (+ y1 h)))
   (command "pline" p11 "W" "0" "0" p21 p31 p41 "")

   (setq p5 (list (+ x1 d1) (+ y1 n)))
   (setq p6 (list (+ x1 d1) (+ y1 e)))
   (setq p7 (list (+ x1 f) (+ y1 l)))
   (setq p8 (list (- x1 f) (+ y1 l)))
   (setq p9 (list (- x1 d1) (+ y1 e)))
   (setq p10 (list (- x1 d1) (+ y1 n)))
   (command "pline" p5 p6 "A" p7 "L" p8 "A" p9 "L" P10 "")
   (setup)
 )
   (setup)
 )
