AutoCAD Command Line Switches
What are Command Line Switches Kenny?
Command Line Switches are parameters that you add to the acad.exe
command line which enable AutoCAD to perform additional operations when it
starts. For example, AutoCAD can start with an alternative configuration,
run a script, load a template drawing and even open a drawing with a saved
Personally, I feel that Command Line Switches are often neglected by
the AutoCAD programmer/system manager. Why? I don't know as they can
drastically cut down on setting up workstations and help a hell of a lot
in enforcing drawing office standards.
Before we have a look at the Command Line Switches, let's have a look
at how AutoCAD deals with them :
- If you use a Command Line Switch to specify an environment setting,
the Command Line Switch overrides the settings specified in either the
Options dialog box or the environment value.
- If a Command Line Switch is not set, the corresponding value set in
the Options dialog box is used.
- If neither a Command Line Switch nor an Options value is set, the
environment variable value is used
Note : Command
Line Switches and environment variables override Options values for the
current session only. They do not alter the system registry.
Okay dokey, now let's have a look at how we
go about changing a Command Line Switch :
- Make a backup copy of your AutoCAD 2002 icon.
Right-click on the icon and then Copy and Paste it to a safe location.
- Again, Right-Click on the AutoCAD 2002
icon on your Desktop.
- Choose Properties
- In the AutoCAD 2002 Properties dialog,
select the Shortcut tab.
This is what it should look like :
The section that we are interested in is the
"Target" edit box, which in this example contains
A word of warning though, when making changes to the Target box, make sure
you don't accidentally remove any section of the application path or
filename itself, Make sure that there is a single space after the path and
file argument and before you switch. Also, ensure there is a space between
each argument and your switch statements. If your path or file names have
spaces in them, you will have to surround the path or name with double
quotes. In fact, to be on the safe side, I surround all my paths and file
names with double quotes.
Right, let's have a look at the switches :
Syntax and Example
path ["drawing file"] /b "script"
"C:\AutoCAD 2002\acad.exe" /b
|Open a drawing and runs a Script.
Drawing name is optional.
path /c "Configuration File"
"C:\AutoCAD 2002\acad.exe" /c
|Specifies the hardware configuration
file to use.
"C:\AutoCAD 2002\acad.exe" /nologo
|Starts AutoCAD without the splash
path /b profile
"C:\AutoCAD 2002\acad.exe" /p
|Starts AutoCAD with the specified
Profile name. If the Profile does not exist, AutoCAD uses the
"C:\AutoCAD 2002\acad.exe" /r
|Resets all AutoCAD default settings,
printers and system pointing device.
path /s "Support Paths"
"C:\AutoCAD 2002\acad.exe" /s
|Designates additional Support Paths.
path ["drawing file"] /t "Template File"
"C:\AutoCAD 2002\acad.exe" /t "C:\MyTemplates\MyTemplate"
|Creates a new drawing based on a
Template or Prototype drawing. Drawing name is optional.
path ["drawing file"] /v "View Name"
"C:\AutoCAD 2002\acad.exe" "MyDrawing" /v
|Opens a drawing with a predefined
You can of course string the Command
Line Switches together. For example, to open AutoCAD with no splash screen
using a user defined profile and template drawing, you would use the
following syntax :
"C:\AutoCAD 2002\acad.exe" /nologo /p
"C:\profiles\MyProfile" /t "C:\MyTemplates\MyTemplate"
Would you like AutoCAD to open in a specific directory every time?
You would? Good!!!
Then just place your directory path in the "Start In" edit box.