why AutoLISP in AutoCAD?

Learning AutoLISP is radically different from learning AutoCAD. AutoLISP is a programming language with its own commands, its own structure, and its own syntax. However, with a knowledge of AutoLISP, AutoCAD operators can amplify their powers with AutoCAD. AutoLISP puts new tools at your fingertips:

  • Mathematical calculations
  • Creating variables to hold values
  • Reading and changing AutoCAD system variables Creating reusable functions
  • Accessing and changing entity properties
  • Accessing drawing file properties
  • Reading and writing ASCII files

But why AutoLISP? Why not BASIC or Pascal or a language that’s more commonly known?

AutoLISP is based on the common LISP language, which is widely used in artificial intelligence applications. As a subset of the LISP language, AutoLISP derives the majority of its functions directly from the LISP language itself. AutoLISP is also a superset of the LISP language, such that it contains commands specific to working with AutoCAD. Thus, AutoLISP was chosen and developed to work with AutoCAD for several reasons:

  • LISP excels at working with lists, which is precisely the type of information AutoCAD manipulates.
  • The LISP interpreter is ideally suited to direct interaction by the designer.
  • LISP is among the easiest of all programming languages to learn and to master.
  • Because of LISP’s simple syntax, its interpreter is small and easy to implement.
See also  Using the Visual LISP Console Window

The purpose of this class is to provide each student with a solid foundation in AutoLISP. We will write a number of AutoLISP routines during the course. Many of these routines will be useful building blocks for future AutoLISP work that you will want to do. Some of these programs will simply need to be typed in; for others you will need to create the steps yourself. Not only will we learn the commands of AutoLISP, we will learn to begin to think in AutoLISP, to debug our programs, to translate the solution to a problem in terms of AutoLISP, to use good techniques that will be easily understandable to ourselves and others.

We will use AutoCAD’s built-in Visual LISP editor to write the AutoLISP code, and will learn many of its helpful features for formatting, checking, and debugging our routines.

Though much can be learned during class, your success with AutoLISP depends on practicing the concepts and methods that we will discuss. Be sure that you set aside some time each week to try out the techniques that you’ll learn in this class.

Back to top button