(Vmon)
;    Draw side view of stairs.
(Defun C:Stairs (/ P1 A B C D P2 P3 P4)
  (Setvar "Cmdecho" 0)
  (Initget 1)
  (Setq P1 (Getpoint "\nEnter point where stairs begin: "))
  (Initget 3)
  (Setq A (Getdist "\nEnter floor to floor height: "))
  (Initget 3)
  (Setq B (Getdist "\nEnter tread depth: "))
  (If
    (Minusp B)
      (Setq C -1)
      (Setq C 1)
  )
  (Setq D (- 17.5 (Abs B)))
  (Setq D (Fix (/ (Abs A) D)))
  (Setq E (- D 1))
  (Setq A (/ A D))
  (Setq P2 (Polar P1 0 C))
  (Command "Pline" P2)
  (While
    (>= D 1)
      (Setq P3 (Polar P1 (/ Pi 2) A))
      (Setq P4 (Polar P3 0 (+ B C)))
      (Setq D (- D 1))
      (Command P3 P4)
      (Setq P1 (List (- (Car P4) C) (Cadr P4)))
  )
  (Command "U")
  (Setq P5 (Getpoint P4 "\nLength of landing: "))
  (Command P5 "")
  (Princ "\nTotal of ")
  (Princ E)
  (Princ " stairs.")
  (Princ)
)
