2012

Table Of Contents
While AutoCAD is running, you can invoke other programs or utilities, such
as the following:
Windows system commands and utilities, such as start, type, dir, or copy
Applications such as text editors or word processors
Database managers, spreadsheets, and communications programs
User-supplied programs, such as batch files or VBA macros
When you enter an external command, AutoCAD looks for the command in
acad.pgp. The first section of acad.pgp defines external commands. You can
add command definitions by editing acad.pgp in an ASCII text editor. In
addition to command aliases in acad.pgp, you will also find comment lines
which are preceded by a semicolon (;). Comment lines allow you to add textual
information to acad.pgp, such as when or who revised the file last.
NOTE Before you edit acad.pgp, create a backup file so that you can restore it
later, if necessary.
When you define an external command, you specify a command name to be
used at the command prompt and an executable command string that is
passed to the operating system. Each line in the external commands section
has five comma-delimited fields, as follows:
command,[executable/shell request],bit flag[,[*]prompt[,re
turn_code]]
command The command that is entered at the command prompt. If the
name is an internal AutoCAD command name, it is ignored. The name is not
case-sensitive.
executable/shell request The constant string sent to the operating system
when you enter a command name. It can be any command that you can
execute at the operating-system prompt. The string can include switches or
parameters. The case-sensitivity of this string depends on the application you
are running.
bit flags A required bitcoded parameter. Add these integer values in any
combination to achieve the result you want.
0 Start the application and wait for it to finish.
1 Don't wait for the application to finish.
2 Run the application in Minimized mode.
4 Run the application hidden.
Define External Commands | 21