If I may ask, why do you need to split DWG, and then compose it again with the same info ?
If DWG is too large, you can pack it with zip, and then if it's again too large split archive into several parts. When you want to use DWG, you can compose these parts into zip and then unpack it and have complete DWG...
If you need exactly what you said, you can use "WBLOCK" command with selection of objects that are within each one of 3x3 windows... This code will try to grab 3x3=9 dwg files in specified folder, but because of the thing that you want whole objects - not trimmed and because of required "CP" - crossing polygon selection mode, there may be less than 9 DWG during export... Routine ensures firstly that DWG is saved as active document, then erases all objects in model space, xref attaches previously exported files and saves again new DWG with filename "dwgname-rcall.dwg" in specified directory where are also other exported dwg xref files stored...
Code:
(defun c:splitdwg3x3 ( / dwgn dwgname path fildia osm aobj adoc avp vpw vph vpcenpt ptll ptur rc1s rc1e rc2s rc2e rc3s rc3e rc4s rc4e rc5s rc5e rc6s rc6e rc7s rc7e rc8s rc8e rc9s rc9e )
(vl-load-com)
(setq dwgn (getvar 'dwgname))
(setq dwgname (substr dwgn 1 (- (strlen dwgn) 4)))
(setq fildia (getvar 'filedia))
(setq osm (getvar 'osmode))
(setvar 'osmode 0)
(setvar 'tilemode 1)
(vl-cmdf "_.zoom" "e")
(setq aobj (vlax-get-acad-object)
adoc (vla-get-activedocument aobj)
avp (vla-get-activeviewport adoc)
vpw (vla-get-width avp)
vph (vla-get-height avp)
vpcenpt (vlax-safearray->list (vlax-variant-value (vla-get-center avp)))
ptll (mapcar '- vpcenpt (list (/ vpw 2) (/ vph 2)))
ptur (mapcar '+ vpcenpt (list (/ vpw 2) (/ vph 2)))
)
(vla-save adoc)
(setq rc1s ptll
rc1e (mapcar '+ ptll (list (/ vpw 3) (/ vph 3)))
rc2s (mapcar '+ ptll (list 0. (/ vph 3)))
rc2e (mapcar '+ ptll (list (/ vpw 3) (* (/ vph 3) 2)))
rc3s (mapcar '+ ptll (list 0. (* (/ vph 3) 2)))
rc3e (mapcar '+ ptll (list (/ vpw 3) vph))
rc4s (mapcar '+ ptll (list (/ vpw 3) 0.))
rc4e (mapcar '+ ptll (list (* (/ vpw 3) 2) (/ vph 3)))
rc5s (mapcar '+ ptll (list (/ vpw 3) (/ vph 3)))
rc5e (mapcar '+ ptll (list (* (/ vpw 3) 2) (* (/ vph 3) 2)))
rc6s (mapcar '+ ptll (list (/ vpw 3) (* (/ vph 3) 2)))
rc6e (mapcar '+ ptll (list (* (/ vpw 3) 2) vph))
rc7s (mapcar '+ ptll (list (* (/ vpw 3) 2) 0.))
rc7e (mapcar '+ ptll (list vpw (/ vph 3)))
rc8s (mapcar '+ ptll (list (* (/ vpw 3) 2) (/ vph 3)))
rc8e (mapcar '+ ptll (list vpw (* (/ vph 3) 2)))
rc9s (mapcar '+ ptll (list (* (/ vpw 3) 2) (* (/ vph 3) 2)))
rc9e ptur
)
; (vl-cmdf "_.rectangle" rc1s rc1e)
; (vl-cmdf "_.rectangle" rc2s rc2e)
; (vl-cmdf "_.rectangle" rc3s rc3e)
; (vl-cmdf "_.rectangle" rc4s rc4e)
; (vl-cmdf "_.rectangle" rc5s rc5e)
; (vl-cmdf "_.rectangle" rc6s rc6e)
; (vl-cmdf "_.rectangle" rc7s rc7e)
; (vl-cmdf "_.rectangle" rc8s rc8e)
; (vl-cmdf "_.rectangle" rc9s rc9e)
(setvar 'filedia 0)
(if (not (vl-catch-all-error-p (setq path (vl-catch-all-apply 'vl-filename-directory (list (getfiled "Select destination directory for 3x3 dwg split export - pick one file in desired folder" "" "" 4))))))
(progn
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc1.dwg") "" rc1s "CP" rc1e (list (car rc1e) (cadr rc1s)) rc1s (list (car rc1s) (cadr rc1e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc2.dwg") "" rc2s "CP" rc2e (list (car rc2e) (cadr rc2s)) rc2s (list (car rc2s) (cadr rc2e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc3.dwg") "" rc3s "CP" rc3e (list (car rc3e) (cadr rc3s)) rc3s (list (car rc3s) (cadr rc3e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc4.dwg") "" rc4s "CP" rc4e (list (car rc4e) (cadr rc4s)) rc4s (list (car rc4s) (cadr rc4e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc5.dwg") "" rc5s "CP" rc5e (list (car rc5e) (cadr rc5s)) rc5s (list (car rc5s) (cadr rc5e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc6.dwg") "" rc6s "CP" rc6e (list (car rc6e) (cadr rc6s)) rc6s (list (car rc6s) (cadr rc6e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc7.dwg") "" rc7s "CP" rc7e (list (car rc7e) (cadr rc7s)) rc7s (list (car rc7s) (cadr rc7e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc8.dwg") "" rc8s "CP" rc8e (list (car rc8e) (cadr rc8s)) rc8s (list (car rc8s) (cadr rc8e)) "")
(vl-cmdf "_.-wblock" (strcat path "\\" dwgname "-rc9.dwg") "" rc9s "CP" rc9e (list (car rc9e) (cadr rc9s)) rc9s (list (car rc9s) (cadr rc9e)) "")
(vl-cmdf "_.erase" (ssget "_X" '((410 . "Model"))) "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc1.dwg") rc1s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc2.dwg") rc2s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc3.dwg") rc3s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc4.dwg") rc4s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc5.dwg") rc5s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc6.dwg") rc6s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc7.dwg") rc7s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc8.dwg") rc8s "" "" "")
(vl-cmdf "_.-xref" "A" (strcat path "\\" dwgname "-rc9.dwg") rc9s "" "" "")
(vl-cmdf "_.saveas" "" (strcat path "\\" dwgname "-rcall.dwg"))
))
(setvar 'filedia fildia)
(setvar 'osmode osm)
(princ)
)
Hope this helps, M.R.