|History of AutoLISP|
The history of AutoLISP is closely tied to the history of AutoCAD, so a quick survey of the development of AutoCAD is given first.
AutoCAD was first demonstrated for the public in November 1982 at the COMDEX trade show in Las Vegas. The first shipments of AutoCAD came the next month. Here is a list of the major AutoCAD releases including a few selected features for each release to illustrate the growth of AutoCAD. AutoLISP appeared between Release 6 and Release 7.
- Release 1 (Version 1.0) — December, 1982
- No dimensioning, menus were limited to 40 items.
- Release 2 (Version 1.2) — April, 1983
- Price was $1000. The optional dimensioning add-on cost an extra $250.
- Release 3 (Version 1.3) — August, 1983
- Added standardized colors, rubber-band cursor, ability to configure, and right-justified text.
- Release 4 (Version 1.4) — October, 1983
- New commands UNITS, HATCH, BREAK, FILLET, ARRAY, WBLOCK, and SCRIPT as well as new methods for creating circles and arcs.
- Release 5 (Version 2.0) — October, 1984
- Added non-continuous linetypes, user-named layers, dragging, an isometric grid, and attributes as well as the commands SAVE, VSLIDE, MSLIDE, OSNAP, and MIRROR.
- Release 6 (Version 2.1) — May, 1985
- New ability to rotate plot 90 degrees, external programs run from the command prompt (ACAD.PGP file), objects highlighted as selected, new polyline entity (PLINE and PEDIT), 3D geometry and viewing (ELEV, VPOINT, HIDE), as well as new commands CHAMFER and BLIPMODE.
- Version 2.18 — January, 1986
- This was a minor release between Version 2.1 and Version 2.5, but it did contain the first full version of the AutoLISP programming language.
- Release 7 (Version 2.5) — June, 1986
- The FILLET command now handles circles and arcs, access to system variables through SETVAR, new commands UNDO, DTEXT, EXPLODE, TRIM, EXTEND, STRETCH, OFFSET, ROTATE, SCALE, DIVIDE, and MEASURE.
- Release 8 (Version 2.6) — April, 1987
- Added point filters, associative dimensioning, and the command 3DFACE
- Release 9 — September, 1987
- Added pull-down menus, dialog boxes, and twenty text fonts
- Release 10 — October, 1988
- Multiple “tiled” viewports, user-defined coordinate systems (UCS), perspective view, and six commands for creating surface meshes.
- Release 11 — October, 1990
- Paper space and non-tiled paper space viewports, ordinate dimensions, external references (XREF), solid modeling (“Advanced Modeling Extension”), a line editor for editing single lines of text, abbreviations in the ACAD.PGP file, fractional input, cylindrical and spherical coordinate entry, and the SHADE command.
- Release 12 — June, 1992
- Immediate access to the graphics screen (no more main menu), dialog boxes for layers, dimensioning, plotting, etc., grips, regions, and commands BHATCH, and RENDER.
- Release 13 — February, 1995
- A new ACIS solid modeler, true ellipses and splines, customized toolbars, realtime zoom and pan, infinite construction lines and rays, multiple parallel lines, object linking and embedding (AutoCAD drawings can be embedded in other documents, such as a word processing document, or other documents, such as a spread sheet, can be included in an AutoCAD drawing), handling text in paragraphs, associative hatching and boundary hatching, spell checker, TrueType fonts, geometric dimensioning and tolerancing frames.
- Release 14 — May, 1997
- No more DOS version. Added autosnap toggle, filter tracking, friendlier object properties tools, viewing drawings on the internet.
- Release 2000 — April, 1999
- Ability to open several drawing in an AutoCAD editing session and copy/paste between them. New design center which streamlines borrowing blocks, layers, text styles, etc. from another drawing. QDIM command for quickly creating multiple dimensions. AutoTrackTM enhanced referencing of points relative to osnap points. New convenient procedures for editing object properties. Lineweights.
- Release 2002 — June 2001
- Improved associative dimensions, friendlier editing and extracting of block attributes, and improved web-based features for long distance collaboration.
Types of Programming Languages
Computers can be programmed using various programming languages. The subject of computer programming stems back to the historic 1946 treatise of John von Neumann (et al) which described in detail the concept of storing programmed instructions to control the operations of a digital computer. From this fundamental notion, a wide variety of computer programming languages evolved.
During the 50’s, 60’s, and 70’s various computer languages developed for different purposes. These languages can be grouped in several categories including:
- Algorithmic/procedural languages such as Fortran, Algol, Cobol, and PL/1
- Time-sharing languages such as BASIC
- Process-control languages such as APT
- String processing languages such as Snobol, and
- List processing languages such as LISP (“LISP” stands for list processing)
History of LISPLISP was created in the context of AI (Artificial Intelligence) research. In 1956 John McCarthy developed the foundation for LISP during the Dartmouth Summer Research Project on AI.
During the early 60’s, the principal dialect of LISP was Lisp1.5. Then many different dialects and implementations for various computers appeared, including BBNLisp, Interlisp, MacLisp, NIL (New Implementation of Lisp), Franz Lisp, Scheme, Flavors, LOOPS (Lisp Object Oriented Programming System), SPICE-Lisp, and PSL (Portable Standard Lisp). The 70’s and early 80’s even saw the development of specialized computers known as Lisp Machines which were designed specifically to run LISP programs.
In 1981 many LISP programmers got together to identify the common aspects of certain dialects and thus created Common LISP. By 1984 Common Lisp was considered the de facto standard. Golden Common LISP was developed from Common LISP for the IBM PC, and David Betz developed XLISP, which is the dialect of LISP on which AutoLISP is based.
AutoLISP’s Roots in LISP
AutoLISP is a direct descendant of the XLISP dialect of the LISP programming language. In fact, AutoLISP can be considered both a subset and a superset of XLISP. It is a subset since it does not include all the functions contained in XLISP. It is a superset since it contains many functions not found in XLISP. These added functions allow AutoLISP to interact with AutoCAD’s drawing database and commands. However, in concept, syntax, and programming style, LISP (XLISP in particular) is clearly the progenitor of AutoLISP.
AutoLISP has been included in AutoCAD ever since version 2.18 (January, 1986). Although it has grown, it has maintained its continuity over the years. Each time a new release of AutoCAD comes out, you can expect to find a few new AutoLISP functions. Here are some that have appeared in past releases of AutoCAD:
- Release 7 (Version 2.5)
- Introduced access to entities in the drawing database.
- Release 8 (Version 2.6)
- Introduced 3D points and the functions getcorner, getkword, and initget.
- Release 9
- Introduced the command function and ssget filters.
- Release 10
- Introduced enhanced functions findfile and load; new functions getenv, handent, and vports.
- Release 11
- Introduced enhanced function entget; new functions cvunits and entmake.
- Release 12
- Introduced enhanced functions ssget and initget; new functions alert, getfiled, and textbox, and programmable dialog boxes using the DCL (Dialog Control Language).
- Release 13
- Introduced several new functions including acad_strlsort, autoload, help, and acad_colordlg.
- Release 14
- Introduced Visual LISP™, a complete AutoLISP programming environment.
- Release 2000
- Visual LISP™ now built in.
Naturally, these new functions and enhanced functions are welcomed additions. They represent growth and seldom make the old functions obsolete. For the most part, the old functions work the same in the latest release as in previous releases. In fact, when compared with operating systems, the format of the drawing database, and the user interface, AutoLISP is one of the more consistent aspects of AutoCAD.
A Few Sample Differences
Despite the basic continuity of AutoLISP, there are some bothersome changes that appear from time to time. Here are some that came along with AutoCAD R13, R14, and AutoCAD 2000.
(1) Ellipses — In R13 ellipses have a true elliptical shape, whereas in R12 ellipses were made up of polylines having a series of circular arc segments. The new ellipses are stored in the drawing database differently than the old ones, and any AutoLISP programs which manipulated ellipses had to be revised for R13.
(2) Solid Models — In R13 all the solid modeling commands and entities changed from the previous AME (Advanced Modeling Extension) to the new ACIS modeler. All AutoLISP programs written for the previous set of solid modeling commands and entities were instantly outmoded.
(3) Lightweight Polylines — In R14 the PLINE command creates an entity called an LWPOLYLINE rather than a standard POLYLINE. (The “LW” stands for light-weight.) The standard POLYLINE entity still exists and is created by the 3DPOLY command or by splining or fitting an LWPOLYLINE. This new LWPOLYLINE is stored more efficiently in memory than the regular polyline. (All vertices are stored in one top-level entry, rather than each vertex being stored in a separate sub-entity.) AutoLISP programs which were written for AutoCAD R13 and earlier, and which extract database information on polylines or attempt to modify polylines, have to be reprogrammed so that they detect this new type of entity and work with its new method of storage.
(4) ADS — In R14 ADS is obsolete. The AutoCAD Development System (ADS) was the C-language extension of AutoLISP. External programs were written in C, compiled for a given operating platform, then called as part of an AutoLISP program. ADS is replaced by ARX (AutoCAD Runtime Extension).
(5) AutoLISP Interpreter — In AutoCAD 2000 the AutoLISP interpreter is new, which results in a number of significant changes, especially for advanced programming. (As just one example, in earlier versions of AutoLISP, functions were stored internally as lists. Advanced programs which read or manipulate program code elements, as opposed to merely reading and manipulating data, need to use one of several new function-defining functions to continue this practice in AutoCAD 2000.) Also, Visual LispTM in AutoCAD 2000 has a number of significant differences from the Visual Lisp that was available for use in Release 14. There are a number of concerns for the beginning and intermediate programmer as well, a few of which are cited in the following items.
(6) New Default Settings for Osnap — In contrast to earlier releases of AutoCAD, which set all osnap modes “off” by default, AutoCAD 2000 sets certain osnap modes “on” by default. A good program should always save the user’s current settings, set osnaps as needed throughout the program, then restore the user’s settings when the program is finished, even in earlier versions of AutoCAD. However, those programs which “got by” without doing this may produce bogus graphic results or may even crash when run in AutoCAD 2000.
(7) Printed Messages Delayed — In versions of AutoCAD before 2000, the output from the various print functions was displayed in the command prompt area immediately. However, in AutoCAD 2000 the messages are held in a buffer until a return character is encountered, such as “\n” or “\r”. Depending on how a message or prompt has been programmed, this can create the following situation: an AutoLISP program is actually waiting for input but the message or prompt has not yet been displayed and AutoCAD is still displaying its command prompt. This would be confusing to any AutoCAD user, and requires reprogramming.
(8) Upper and Lower Case — In AutoCAD 2000 symbol table names (such as layer names, text style names, block names, etc.) are no longer just upper case. If an application makes comparisons of such names, and assumes that they will all be upper case, the application will need to be revised.
(9) Revised Error Messages — The wording of many error messages is different in AutoCAD 2000. Any user defined error routines which make use of the error string passed to it will have to be revised to accommodate these new wordings.
(10) Better Associative Dimensions — Associative dimensions are now more firmly associated with part geometry, and a new system variable, DIMASSOC, replaces the old DIMASO. Programs which used to set DIMASO to 1, to make sure that associative dimensioning was turned on, should now set DIMASSOC to 2.