Tables of Contents for The Autocadet's Guide to Visual Lisp
The History of Visual LISP
1
3
LISP versus other languages
1
2
Programming Choices in AutoCAD
4
5
Finding Your Way Around the IDE
9
6
Exiting and reentering the IDE
11
1
Navigating the Console window
12
1
Navigating the text editor
13
2
Loading a Program into AutoCAD
20
1
Using the IDE to Debug Programs
21
2
Finding parentheses imbalance
21
1
Using breakpoints and the Watch window
22
1
The Essence of Visual LISP
25
28
Assigning values to symbols
28
1
Physical versus logical code lines
29
1
Reserved functions in LISP
29
1
All expressions return an answer
30
1
Evaluate now or later?
30
1
Defining symbols with SET
32
1
Defining symbols with DEFUN
33
1
Recovering from Errors
42
3
Example: Returning Current AutoCAD Settings
45
5
Building larger strings
55
1
Finding the length of a string
56
1
Substituting characters in a string
56
1
Returning a portion of a string
57
1
Converting between Strings and Symbols
62
1
The (PARSE-STRING) function
63
2
The (STRING_TO_NUMBERS) function
65
3
Manipulating Numbers as Numbers
71
6
Addition, subtraction, multiplication, and division
71
1
Square root and exponent
73
1
Greatest common denominator
74
1
Sine, cosine, and arctangent
75
1
Manipulating Numbers as Bit Patterns
77
2
Converting Numbers and Strings
83
10
Converting Strings to Real Numbers
84
1
Converting Real Numbers to Strings
85
2
Converting a String to a List of Numbers
89
1
Example: Importing and Using Point Data
89
2
Using Conditionals and Loops
93
16
Testing numeric values
96
2
Differences between IF and COND
100
2
Example: Importing Text from a File
104
3
Storing and Accessing Lists in LISP
112
3
Accessing data using specialized subrs
113
1
Accessing data using composite primitives
114
1
Dotted pair list structure
116
1
Association list structure
116
2
Looping through Lists
118
1
Example: Getting Information from a Point List
122
1
Coordinate Transformations
123
3
Building AutoCAD Commands
127
1
The Command Line and the Graphics Screen
128
1
AutoCAD Command Output
131
2
Finish what you started
132
1
System Variables for Output
133
1
Example: Reporting Dates and Times
134
3
Building AutoCAD Commands
139
1
Example: Moving and Rotating an Entity
145
3
Introducing Dialog Boxes
149
26
How Dialog Boxes Work
149
2
Creating a Dialog Box
151
4
Toggles and radio buttons
158
1
The Art of Dialog Box Design
159
3
Program Manipulation of Dialog Boxes
162
2
Programming Callback Functions
164
1
Using Lists in Dialog Boxes
165
1
Rules and Suggestions for Programming Dialog Boxes
166
2
Dialog Box to AutoCAD and Back
168
1
Example: Creating the Final Dialog Box
169
4
Working with AutoCAD Drawings
175
14
Entities, Selections, and Tables
175
1
Defining Entities in AutoCAD
176
1
Examples: Accessing and Manipulating Entities
184
3
Using Selection Sets and Tables
189
14
Accessing a selection set
190
2
Getting a selection set
192
4
Example: Finding Points in a Block Definition
197
2
Example: Converting Block Points
199
2
Saving and Sharing Data
203
12
Saving Data in User Variables
204
1
Saving Data in Attributes
204
1
Examples: Handling Attributes
205
2
Saving with Extended Data
207
4
Saving Data in a Dictionary
211
2
AutoCAD Interface Programming
215
10
Manipulating AutoCAD Menus
215
1
Exploring AutoCAD Objects
216
4
Object-Level Reactors
231
4
The Life of a Reactor
235
1
Rules and Suggestions for Working with Reactors
236
2
Working with the Computer
239
10
Disks, Files, and Directories
240
1
Visual LISP File Management Tools
245
3