2011

Table Of Contents
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],flags[,[*]prompt[,return_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 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.
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.
8 Put the argument string in quotes.
Bit values 2 and 4 are mutually exclusive; if both are specified only the 2 bit
is used. Using value 2 or 4 without value 1 should be avoided, because
AutoCAD becomes unavailable until the application has completed.
Bit value 8 allows commands like del to work properly with file names that
have embedded spaces. This eliminates the possibility of passing a
space-delimited list of file names to these commands. If you prefer multiple
file support, do not use the bit value 8.
prompt An optional field. It specifies the prompt to display on the AutoCAD
command line or for the dynamic input tooltip. The response to this prompt
is appended to the string supplied in the executable field. If the first character
of the prompt field is an asterisk (*), the response can contain spaces and the
user must press ENTER to terminate it. Otherwise, the response is terminated
by either SPACEBAR or ENTER. If no prompt is specified, no input is requested;
however, you must add a comma if a return code is to be supplied or if you
want the prompt to have a trailing space.
Define External Commands | 21