The AutoCADET's Guide to Visual LISP: Optimize and Customize Your AutoCAD Design Environment

LISP is an acronym for List Processing (not Lost In Stupid Parentheses, although sometimes one does wonder). A list is an ordered collection of data; the organization of the list is up to the programmer. Some lists are expected to have a standard structure, such as lists of points or lists of entity object data that AutoCAD should process.
Lists can be made up of any data type, including other lists. And lists can contain any mixture of data. For example you could have a list that contains a layer name with a count of entity objects, color code, last Z elevation used, and so forth. You could then create a list containing multiple copies of the previous list described for each layer in a drawing. It is up to your application to keep track of what you are working on.
In this chapter, you look at how to build and access data in lists. Then you look at some specific list types in AutoCAD programming, such as point lists and association lists. Lists representing point data are important in AutoCAD, and you will explore several subrs for manipulating points. You then dig deeper into lists by learning about the concepts of list storage that LISP employs. By the end of the chapter, you should know how to create a list of your own design and manipulate it using several techniques.
Lists are created either all at once or in pieces. Most applications build on...