2012

Table Of Contents
message. A load failure can be caused by incorrect coding in the file or by
entering the wrong file name at the command prompt. The syntax for the
load function is
(load filename [onfailure])
This syntax shows that the load function has two arguments: filename, which
is required, and onfailure, which is optional. When loading an AutoLISP file
at the command prompt, you typically supply only the filename argument.
The following example loads the AutoLISP file newfile.lsp.
Command: (load "newfile")
The .lsp extension is not required. This format works for any LSP file in the
current library path.
To load an AutoLISP file that is not in the library path, you must provide the
full path and file name as the filename argument.
Command: (load "d:/files/morelisp/newfile")
NOTE When specifying a directory path, you must use a slash (/) or two backslashes
(\\) as the separator, because a single backslash has a special meaning in AutoLISP.
Quick Reference
Commands
APPLOAD
Loads and unloads applications and defines which applications to load at
startup.
Automatically Load and Run AutoLISP Routines
You can load AutoLISP routines each time you run AutoCAD. You can also
execute certain commands or functions at specific times during a drawing
session.
Overview of AutoLISP Automatic Loading
See also:
Load an AutoLISP File on page 342
436 | Chapter 7 Introduction to Programming Interfaces