I hear ya MP. This is a fragment from an old ADOLisp file I had laying around, and this is 5 years old:
(setq ConnectString "Provider=MSDASQL;Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\\ADOLISP_test.mdb")
(prompt (strcat "\n\nConnecting to the database using \n\""
ConnectString
"\""
)
)
Open and close multiple drawings!!!??? Are you kidding me!! :realmad:
;batch_anything.lsp
;Created for G.E.I.S. by P.R. Donnelly
;Date: Sept of 2002
;Description: Batch Process
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;start prog
(DEFUN C:batch_anything ()
;;;;;;;;;;;;;;;;;;;;;;;;;Select directory to be processed
(setq dfil (getfiled "Select A File In The Directory You Want To Batch Process" "p:/" "dwg" 0))
(setq wutdir (vl-filename-directory dfil))
(setq wutfiles (vl-directory-files wutdir "*.dwg"))
(setq scrfile (open "c:\\scrfile.scr" "w"))
(close scrfile)
(setq scrfile (open "c:\\scrfile.scr" "a"))
(foreach n wutfiles
(setq n2 (strcat "\""wutdir "\\" n "\""))
(setq n2 (vl-string-translate "\\" "\\" n2))
(setq scrline (strcat "open" " " n2 " " "(load\"batch_core\")" " " "batch_insert" " " "qsave" " " "close"));;;;;;;COMMANDS FOR BATCH GO HERE
(write-line scrline scrfile)
(princ)
)
(close scrfile)
(command "script" "c:\\scrfile")
(princ "\n***Batch complete.***")
(princ)
);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;DEFUN