AutoCAD/Running a script at the AutoCAD start up
Expert: Scott Cook - 11/1/2007
QuestionQUESTION: Hello, I am trying to process multiple drawings using .bat file which launch the ACAD 2006, at the start up it will run a script automatically. My bat file is working neatly until it launches ACAD. it is not runnung the specific script file on it's own.
CAn you help me in this regard?
ANSWER: are you passing the script file into the command line arguments for acad?
---------- FOLLOW-UP ----------
QUESTION: I am asking bat file to open cad drawing (FOR %%f in (C:\WBOUT\dwg\*.dwg) do start /wait "C:\Program Files\Autodesk Architectural Desktop 2006\ acad.exe" /b"C:\WBOUT\wbout.scr" )and using /b switch to make the specified script run at start up.
If this /b method is used in describing a shortcut in windows, it works, however in DOS, batfile stops after launching AutoCAD and waits till the session is closed, as soon as the session is closed, next drawing is opened up.However the script is not run at this stage also. What to do?
AnswerI have several random thoughts on this:
1. you might need a space between the /b and the scriptfile name.
2. you don't need quotes around the scriptfile name unless it contains spaces
3. you need a save and quit at the end of the script
4. does the script run?
5. you are supposed to pass the name of the file into the acad command line
I use a free program called runbatch that I wrote and is available at www.plot2000.com. The script would need to get turned into a lisp for runbatch to work. that is another possibility for you.