How to automatically load LISP routines in AutoCAD.
Editor reactors are notified each time a command is issued, whether at the AutoCAD Command prompt, from a user interface element, or an AutoLISP program. So, the callback function for this DWG reactor needs to determine precisely what it is responding to. In the current example, save-drawingInfo simply checks for the Save command.
As well as this, AutoLisp can only read a file in sequential order. (It does not have random access.) Despite these drawbacks, AutoLisp has certain basic tools that allow you to read and write one character at a time, or a full line at a time.
The Write Block dialog box is displayed. Entering -wblock at the Command prompt displays a standard file selection dialog box in which to specify a name for the new drawing file, followed by command prompts.If FILEDIA is set to 0, the standard file selection dialog box is suppressed.
Lisp is the second-oldest high-level programming language after Fortran and has changed a great deal since its early days, and a number of dialects have existed over its history. Today, the most widely known general-purpose Lisp dialects are Common Lisp and Scheme. Lisp was invented by John McCarthy.
There is an enhancement tool for AutoCAD LT that allows to run LISP routines. LT Toolkit provides the ability to load and run Fast-Load AutoLISP files (.fas), Visual LISP Executable files (.vlx) LISP Files (.lsp) and ObjectARX files (.arx) Smart Architect and Toolkit Max also include the ability to run LISP routines in AutoCAD LT, and more.
AutoCAD (but not AutoCAD LT) can extract properties of objects, including elements such as the areas surrounded by polylines, and then write them to a table within the drawing or extract them to an Excel spreadsheet (or both). See the DATAEXTRACTION command.
A selection of AutoLISP tutorials, Visual LISP IDE tutorials, DCL tutorials, links to CAD programming forums, and programming references.