@Markeckert hi,
check this IDwgFldr command.
it insert each dwg page\sheet organizing them in an array with a little offset you can specify at run time.
the number of sheets in row is 5 (that's fills 44"). by setting a new value to ITEMS->ROW you can change it.
after the insert done, you will be asked for Plot. i use "DWG to PDF.pc3" , you can change it but be aware that
changing the device may require a change in (command "-plot" ...) arguments.
enjoy
Moshe
; IDwgFldr.lsp
; by Moshe-A
; DEC 16, 2025
; Import Drawing Folder
(defun c:IDwgFldr (/ initial chop_extension askreal askYesNo ; local functions
savAttdia savAttreq DICTAPPNAME xdef ydef X-SHEET Y-SHEET ITEMS->ROW ; local variables
path xofset yofset files^ base p0 i j name Xmax Ymax plotLL plotUR) ; local variables
(defun initial ()
(setq DICTAPPNAME "IDwgFldrlsp-by-Moshe-A-DEC2025")
(setq xdef (vlax-ldata-get DICTAPPNAME "Xofset" 0.5))
(setq ydef (vlax-ldata-get DICTAPPNAME "Yofset" 0.5))
; some constat
(setq X-SHEET 8.5)
(SETQ Y-SHEET 11.0)
(setq ITEMS->ROW 5) ; number item in a row
); initial
(defun chop_extension (s / p)
(if (setq p (vl-string-search "." s))
(substr s 1 p)
)
); chop_extension
(defun askreal (msg def / ask)
(initget (+ 2 4))
(if (not (setq ask (getreal (strcat "\n" msg " <" (rtos def) ">: "))))
(setq ask def)
(setq def ask)
)
); askreal
(defun askYesNo (msg def / ask)
(initget "Yes No")
(if (not (setq ask (getkword (strcat "\n" msg " <" def ">: "))))
(setq ask def)
(setq def ask)
)
); askYesNo
; here start c:IDwgFldr
(setvar "cmdecho" 0)
(command "._undo" "_begin")
(setq savAttdia (getvar "attdia"))
(setvar "attdia" 0)
(setq savAttreq (getvar "attreq"))
(setvar "attreq" 0)
(initial) ; set some constats
(if (and
(setq path (acet-ui-pickdir "Pick a folder:" (getvar "dwgprefix") "Import Drawing Folder"))
(setq xofset (askreal "X-Offset" xdef))
(setq yofset (askreal "Y-Offset" ydef))
)
(progn
(cond
((not (setq files^ (vl-directory-files path "*.dwg" 1)))
(vlr-beep-reaction)
(prompt "\nNo drawing files found in selected folder.")
); case
((not (setq base (getpoint "\nStart point: "))))
( t
(setq files^ (mapcar (function (lambda (s) (chop_extension s))) files^))
(setq plotLL (list (- (car base) xofset) (- (cadr base) yofset)))
(setq plotUR '(0.0 0.0))
(setq i 0 j 0)
(while (nth (+ (* i ITEMS->ROW) j) files^)
(while (and
(nth (+ (* i ITEMS->ROW) j) files^)
(< j ITEMS->ROW)
)
(setq name (nth (+ (* i ITEMS->ROW) j) files^))
(setq p0 (list (+ (car base) (* j (+ X-SHEET xofset))) (+ (cadr base) (* i (+ Y-SHEET yofset)))))
(command "._insert" (strcat path "\\" name) "_None" p0 1 1 0)
(setq j (1+ j))
); while
(setq Xmax (+ (car p0) (* j (+ X-SHEET xofset))))
(setq Ymax (+ (cadr p0) (* i (+ Y-SHEET yofset))))
(setq j 0) ; reset colums
(setq i (1+ i)) ; inc rows
); while
(if (< (car plotUR) Xmax)
(setq plotUR (list Xmax (cadr plotUR)))
)
(if (< (cadr plotUR) Ymax)
(setq plotUR (list (car plotUR) Ymax))
)
); case
);cond
(vlax-ldata-put DICTAPPNAME "Xofset" xofset)
(vlax-ldata-put DICTAPPNAME "Yofset" yofset)
(if (eq (askYesNo "Plot to PDF?" "Yes") "Yes")
(progn
(setvar "expert" 5)
(command ".-plot" "_Yes" "" "DWG To PDF.pc3" "ANSI full bleed E (34.00 x 44.00 Inches)" "_Inches" "_Landscape"
"_No" "_Window" plotLL plotUR "1=1" "0,0" "_Yes" "acad.ctb" "_Yes" "" "" "_Yes" "_Yes")
(setvar "expert" 0)
); progn
); if
); progn
);if
(setvar "attreq" savAttreq)
(setvar "attdia" savAttdia)
(command "._undo" "_end")
(setvar "cmdecho" 1)
(princ)
); c:IDwgFldr