ISBN.nu logo
isbn.nu
search for books and compare prices
Search >
Tables of Contents for The Autocadet's Guide to Visual Lisp
Chapter/Section Title
Page #
Page Count
Introduction
xi
 
Acknowledgments
xii
 
The Big Picture
1
8
The History of Visual LISP
1
3
LISP versus other languages
1
2
LISP to Visual LISP
3
1
Programming Choices in AutoCAD
4
5
Blocks and menus
4
1
Scripts and DIESEL
4
1
Visual LISP
5
1
ObjectARX
5
1
Visual Basic
5
1
Making a choice
6
1
Getting started
7
2
The Visual LISP IDE
9
16
Finding Your Way Around the IDE
9
6
Starting the IDE
10
1
Exiting and reentering the IDE
11
1
Navigating the Console window
12
1
Navigating the text editor
13
2
Visual LISP Files
15
1
VLIDE Toolbars
16
4
The Standard toolbar
16
1
The Search toolbar
17
1
The Tools toolbar
17
2
The Debug toolbar
19
1
The View toolbar
20
1
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
Summary
23
2
The Essence of Visual LISP
25
28
The Evaluator
25
5
Reading expressions
26
2
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
Atoms and Lists
30
2
Working with Symbols
32
3
Defining symbols with SET
32
1
Defining symbols with DEFUN
33
1
Naming symbols
34
1
Symbol Scope
35
5
Symbol scope examples
36
4
Naming scheme
40
1
Returning Results
40
1
Inspecting Symbols
41
1
Recovering from Errors
42
3
Example: Returning Current AutoCAD Settings
45
5
Summary
50
3
Working with Strings
53
16
Storing Strings
53
1
Manipulating Strings
54
3
Building larger strings
55
1
Converting the case
56
1
Finding the length of a string
56
1
Substituting characters in a string
56
1
Reducing Strings
57
1
Returning a portion of a string
57
1
Trimming strings
57
1
Searching Strings
58
2
Comparing Strings
60
2
Converting between Strings and Symbols
62
1
Example Functions
63
5
The (PARSE-STRING) function
63
2
The (STRING_TO_NUMBERS) function
65
3
Summary
68
1
Working with Numbers
69
14
Integers
69
1
Real Numbers
69
2
Manipulating Numbers as Numbers
71
6
Addition, subtraction, multiplication, and division
71
1
Logarithm and base e
71
2
Square root and exponent
73
1
Modulo
73
1
Greatest common denominator
74
1
Absolute value
75
1
Sine, cosine, and arctangent
75
1
Maximum and minimum
76
1
Unit conversion
77
1
Manipulating Numbers as Bit Patterns
77
2
Custom Boolean Logic
79
2
Summary
81
2
Converting Numbers and Strings
83
10
Integers and Strings
83
1
Converting Strings to Real Numbers
84
1
Converting Real Numbers to Strings
85
2
Working with Angles
87
2
Converting a String to a List of Numbers
89
1
Example: Importing and Using Point Data
89
2
Summary
91
2
Using Conditionals and Loops
93
16
Conditionals
93
2
Test Expressions
95
5
Testing numeric values
96
2
Testing data types
98
1
Testing string values
99
1
Combining tests
99
1
Differences between IF and COND
100
2
Loops
102
2
Example: Importing Text from a File
104
3
Summary
107
2
Working with Lists
109
18
Creating a List
109
1
Adding to a List
110
2
Storing and Accessing Lists in LISP
112
3
Accessing data using specialized subrs
113
1
Accessing data using composite primitives
114
1
Special List Types
115
3
Dotted pair list structure
116
1
Association list structure
116
2
Looping through Lists
118
1
Sorting Lists
119
1
Point Lists
120
2
Example: Getting Information from a Point List
122
1
Coordinate Transformations
123
3
Summary
126
1
Basic User Output
127
12
Building AutoCAD Commands
127
1
The Command Line and the Graphics Screen
128
1
Command-Line Output
129
2
String output
130
1
Non-string output
130
1
AutoCAD Command Output
131
2
Command errors
131
1
Finish what you started
132
1
System Variables for Output
133
1
Example: Reporting Dates and Times
134
3
Summary
137
2
Basic User Input
139
10
Building AutoCAD Commands
139
1
Visual LISP Input
140
1
Command-Line Input
140
4
Graphics Input
144
1
Example: Moving and Rotating an Entity
145
3
Summary
148
1
Introducing Dialog Boxes
149
26
How Dialog Boxes Work
149
2
Creating a Dialog Box
151
4
Standard Tile Types
155
4
Text tiles
157
1
The data entry tile
158
1
Toggles and radio buttons
158
1
List tiles
159
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
Summary
173
2
Working with AutoCAD Drawings
175
14
Entities, Selections, and Tables
175
1
Defining Entities in AutoCAD
176
1
Accessing Entities
177
1
Entity Data Lists
178
3
Entity Objects
181
3
Examples: Accessing and Manipulating Entities
184
3
Summary
187
2
Using Selection Sets and Tables
189
14
Using Selection Sets
189
7
Accessing a selection set
190
2
Getting a selection set
192
4
Using Tables
196
1
Example: Finding Points in a Block Definition
197
2
Example: Converting Block Points
199
2
Summary
201
2
Saving and Sharing Data
203
12
Application Exposure
203
1
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
Summary
213
2
AutoCAD Interface Programming
215
10
Manipulating AutoCAD Menus
215
1
Exploring AutoCAD Objects
216
4
ActiveX Automation
220
2
Summary
222
3
Event Programming
225
14
What Are Events?
225
2
Setting Up a Reactor
227
4
Object-Level Reactors
231
4
The Life of a Reactor
235
1
Rules and Suggestions for Working with Reactors
236
2
Summary
238
1
Working with the Computer
239
10
Types of Data Files
239
1
Disks, Files, and Directories
240
1
Processing Files
241
2
Writing Data
243
1
Reading Data
243
2
Visual LISP File Management Tools
245
3
Summary
248
1
Epilogue
249
2
Index
251
9
What's on the CD-ROM?
260