Normally, loading an application file loads it in the current drawing only, but the vl-load-all function can be used to load a file in all drawings.
- At the AutoCAD Command prompt, enter an AutoLISP statement that uses the vl-load-all function and press Enter.
Note: The vl-load-all function is useful for testing new functions in multiple documents, but in general you should use acaddoc.lsp to load files that are needed in every document.
Example
- At the AutoCAD Command prompt, enter (load "yinyang.lsp") and press Enter.
- Invoke a function defined in the AutoLISP source (LSP) file.
The function should work as expected.
- Create a new or open an existing drawing.
- With the second drawing window active, try invoking the function again.
The response will be an error message saying the function is not defined.
- At the AutoCAD Command prompt, enter (vl-load-all "yinyang.lsp") and press Enter.
- Create a new or open an existing drawing.
- Invoke the function again.
This time the function will work correctly because the vl-load-all function loads the contents of an AutoLISP file into all open documents, and into any documents opened later in the session.