Mastering AutoCAD 2008 and AutoCAD LT 2008

In the previous chapter, you were introduced to AutoLISP, AutoCAD's macro and programming language. You learned that you can take advantage of this powerful tool without having to know anything about its internal workings. In this chapter, you'll see how you can take more control of AutoLISP and have it do the things you want to do for your own AutoCAD environment. You'll learn how to store information such as text and point coordinates, how to create smart macros, and how to optimize AutoLISP's operation on your computer system.
A word of advice as you begin this chapter: Be prepared to spend lots of time with your computer not because programming in AutoLISP is all that difficult, but because it's so addicting! You've already seen how easy it is to use AutoLISP programs. I won't pretend that learning to program in AutoLISP is just as easy as using it, but it isn't as hard as you may think. And once you've created your first program, you'll be hooked.
Topics in this chapter include the following:
Understanding the Interpreter
Using Arguments and Expressions
Creating a Simple Program
Selecting Objects with AutoLISP
Controlling the Flow of an AutoLISP Program
Data-Type Conversions
Storing Your Programs as Files
Getting More Help with AutoLISP
You access AutoLISP through the AutoLISP interpreter, which is a little like a hand-held calculator. When you enter information at the Command prompt, the interpreter evaluates it and then returns an answer. Evaluating means...