Sittingbull Posted March 25, 2011 Share Posted March 25, 2011 Hi all, I'm trying to batch process my drawings. Usually it works fine, but now the process is interrupted. I use a batch file, a script and a lisp. I load the lisp in my script, but its like after doing the lisp it stops going on with the script. Batch file: FOR %%V IN (*.DWG) DO START /W "c" "C:\Program Files\Autodesk\AutoCAD 2011\acad.exe" %%V /nologo /b "C:\Documents and Settings\mlete\My Documents\My Scripts\fixmlist.scr" FOR %%V IN (*.BAK) DO DEL %%V Script: fixmlist.scr model (load"mlistupd") _qsave quit Lisp: mlistupd.lsp (command "filedia" 0) (setvar "osmode" 0) (command "clayer" 0) (command "limits" off) ;;------------------------------------------------------------------------- (setq ss (ssget "x" (list (cons 0 "*line")))) (command "erase" ss "") ;;------------------------------------------------------------------------- (command "clayer" "ISO_LIN_MAT_FRA") (command "line" "0,0" "0,5.5" "") (command "line" "10,0" "10,5.5" "") (command "line" "22,0" "22,5.5" "") (command "line" "89,0" "89,5.5" "") (command "line" "103,0" "103,5.5" "") (command "line" "0,5.5" "180,5.5" "") ;;------------------------------------------------------------------------- (command "-style" "STANDARD" "ARIAL.TTF" "0" "1" "0" "no" "no") (command "ltscale" 1) (command "-layer" "co" "7" "ISO_TEX_MAT" "") ;;------------------------------------------------------------------------- (command "filedia" 1) (setvar "osmode" 1) (command "clayer" 0) Anyone see what i don't? Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 25, 2011 Share Posted March 25, 2011 From your script it looks like AutoCAD has to open and close for each drawing - am I right? Why not just process all the drawings using the script? If you Open and Close the drawings using the script in a single AutoCAD session, AutoCAD doesn't have to close and the drawings are processed a lot faster. These may help you if you decide to go this route: http://lee-mac.com/scriptwriting.html http://lee-mac.com/scriptwriter.html Lee Quote Link to comment Share on other sites More sharing options...
Sittingbull Posted March 25, 2011 Author Share Posted March 25, 2011 Sounds interesting indeed. Didn't now it was possible until now. Thank a lot mate. Regards, SB Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.