(Vmon)
; Draws a double swing, double acting door.
(Defun C:Dsda (/ P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 A1 A2 A)
  (Setvar "Cmdecho" 0)
  (Initget 7)
  (Setq A (* 2 (Getdist "\nEnter width of one door: ")))
  (Initget 1)
  (Setq P1 (Osnap (Getpoint "\nEnter hinge point of door: ") "Nea"))
  (Setvar "Lastpoint" P1)
  (Initget 1)
  (Setq P2 (Osnap (Getpoint "\nTouch point on opposite side of wall: ") "Per"))
  (Initget 1)
  (Setq P3 (Osnap (Getpoint
    "\nShow side of hinge you wish to place door: ") "Nea"))
  (Setq A1 (Angle P1 P3))
  (Setq P3 (Polar P1 A1 A))
  (Setq A2 (Angle P1 P2))
  (Setq P4 (Polar P3 A2 (Distance P1 P2)))
  (Setq P5 (Polar P1 A2 (* (Distance P1 P2) 0.5)))
  (Setq P6 (Polar P3 A2 (* (Distance P1 P2) 0.5)))
  (Setq P7 (Polar P5 A1 (* A 0.5)))
  (Setq P8 (Polar P5 (+ Pi A2) (* A 0.5)))
  (Setq P9 (Polar P6 (+ Pi A2) (* A 0.5)))
  (Setq P10 (Polar P5 A2 (* A 0.5)))
  (Setq P11 (Polar P6 A2 (* A 0.5)))
  (Command "Break" P1 P3 "Break" P2 P4)
  (Command "Line" P1 P2 "" "Line" P3 P4 "" "Line" P1 P8 ""
    "Line" P2 P10 "" "Line" P3 P9 "" "Line" P4 P11 "")
  (Command "Arc" P10 "E" P8 "D" "Per" P6 "Arc" P9 "E" P11 "D" "Per" P5)
  (Command "Insert" "Dinfo" (Polar P2 A1 (* 0.5 A)) (Getvar "Dimscale") "" "0")
  (Princ)
)
