AutoLISP is a dialect of Lisp programming language built specifically to be used with the registered version of AutoCAD. AutoLISP is a derivative of LISP (List processing language) where values and expressions are associated dynamically. Using AutoLISP, AutoCAD becomes customizable and hence makes the work faster. Some of the examples of AutoLISP are mentioned below.
AutoLISP programs plays a great role in building menu macros. This is done by writing AutoLISP routines and saving them as an MNL file. It is also possible to use AutoLISP statements as menu macros.
AutoLISP has many predefined functions which allow controlling the programs.
Using AutoLISP many small but time consuming tasks can be finished faster, a few examples are shown below
All AutoLISP files are stored with a .LSP extension.
Load: (load “Path/filename”)
Note: While giving the filename there is no need to give the file extension
FAS and VLX files are compiled AutoLISP files that have been created with Visual LISP. FAS files contain a single compiled AutoLISP routine, whereas VLX files contain multiple routines. FAS and VLX can load and run a Visual LISP program. The difference however, is that a VLX is a stand-alone program, which implies that it is completely self-contained.
Advantages of using VLX files are
An ARX application is a dynamic link library (DLL) that shares AutoCAD’s address space and makes Direct function calls to AutoCAD. Designed with extensibility in mind, the ARX libraries include macros to facilitate defining new classes and offer the ability to add functionality to existing classes in the library at run time. The ARX libraries can be used in conjunction with the AutoCAD Development System (ADS) and the AutoLISP application programming interfaces.
To Load/ Unload ARX files.
Load : (arxload )
Unload : (arxunload)
Note: While giving the filename there is no need to give the file extension
Microsoft Visual Basic for Applications (VBA) is an object-based programming environment designed to provide rich development capabilities. The main difference between VBA and VB (Visual Basic 6) is that VBA runs in the same process space as AutoCAD, providing an AutoCAD-intelligent and very fast programming environment.
To load VBA files
Load: -vbarun
Note: After entering this the macro name is prompted.