 (defun c:gpa ()
;(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 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 B 25)
   (setq H 6)
   (setq R 2.5)
   (setup1)
 )

 (defun D25()
   (setq D 25)
   (setq B 30)
   (setq H 8)
   (setq R 2.5)
   (setup1)
 )

 (defun D30()
   (setq D 30)
   (setq B 35)
   (setq H 8)
   (setq R 3.0)
   (setup1)
 )

 (defun D35()
   (setq D 35)
   (setq B 40)
   (setq H 8)
   (setq R 3)
   (setup1)
 )

 (defun D40()
   (setq D 40)
   (setq B 45)
   (setq H 10)
   (setq R 4)
   (setup1)
 )

 (defun D50()
   (setq D 50)
   (setq B 56)
   (setq H 12)
   (setq R 5)
   (setup1)
 )

 (defun D60()
   (setq D 60)
   (setq B 66)
   (setq H 15)
   (setq R 5)
   (setup1)
 )

(defun setup1()
  ;(if (< L 0) (setq B (* -1 B)))
   (if (< L 0) (setq D (* -1 D)))
   (if (< L 0) (setq H (* -1 H)))
   (setq B1 (/ B 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 p5 (list (+ x1 D1) (+ y1 H)))
   (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 H)))
   (command "pline" p5 p6 "A" p7 "L" p8 "A" p9 "L" P10 "")
   (setup)
 )
   (setup)
 )
