Dan,
Gap between panes is hard coded at 1/8 inch.
(defun C:Pane (/ p1 p2 x1 x2 y1 y2 Pa Pb wWidth PaneHt PLL
paneCnt PaneWidth paneWidth PanePt Up left
Gap usercmd useros)
(setq usercmd (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq useros (getvar "osmode"))
(setvar "osmode" 175)
(Setq Up (* pi 0.5)
left pi
)
(setq p1 (getpoint "\nPick glass corner")
p2 (getpoint p1 "\nPick diaganal glass corner")
x1 (car p1)
x2 (car p2)
y1 (cadr p1)
y2 (cadr p2)
Pa (list x1 y2)
Pb (list x2 y1)
wWidth (distance p1 pb) ; window width
PaneHt (distance p1 pa) ; window Hight
PLL (list (if (< x1 x2)x1 x2) ; PLL point Lower Left corner
(if (< y1 y2) y1 y2)
)
)
(initget 7)
(setq paneCnt (getint "\nEnter number of panes. "))
(initget 7)
(setq Gap 0.128) ; preset at 1/8 inch
(setq paneWidth (/ (- wWidth (* (1- paneCnt) Gap)) paneCnt)
PanePt PLL
)
(setvar "osmode" 0)
(command "undo" "begin")
;; draw the Glass Panes
(repeat paneCnt
(command "_rectang" PanePt (strcat "@" (rtos PaneWidth 2) "," (rtos PaneHt 2)))
(setq PanePt (polar PanePt 0 (+ PaneWidth Gap)))
) ; end repeat
;;;========== Exit Sequence ============
(command "undo" "end")
(setvar "osmode" useros)
(setvar "CMDECHO" usercmd)
;;; Exit quietly
(princ)
) ; end defun
(princ)
(prompt "\nWindow Pane routine loaded. Enter Pane to run")