(Vmon)
; Draws a single window.
(Defun C:Sw (/ P1 P2 P3 P4 P5 P6 A1 A2 A)
  (Setvar "Cmdecho" 0)
  (Initget 7)
  (Setq A (Getdist "\nEnter width of window: "))
  (Initget 1)
  (Setq P1 (Osnap (Getpoint "\nEnter insertion point of window: ") "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 insertion point you wish to place WINDOW... ") "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) 1 )))
  (Setq P6 (Polar P3 A2 (- (* (Distance P1 P2) 0.5) 1 )))
  (Command "Break" P1 P3 "Break" P2 P4)
  (Command "Line" P1 P2 "" "Line" P3 P4 "" "Line" P5 P6 "")
  (Command "Copy" "L" "" P5 (POLAR P5 A2 2))
  (Command "Insert" "Winfo" (Polar P2 A1 (* 0.5 A)) (Getvar "Dimscale") "" "0")
  (Princ)
)
