- creation and evaluation of AutoCAD drawing
elements using AutoLISP and Visual LISP
inside AutoCAD
- working with AutoCAD drawing objects from
within ObjectARX
- extraction and manipulation of AutoCAD
drawings using COM and ActiveX Automation
from Visual Basic, Delphi or Java programs
- reading and writing DWG files using
ObjectDBX, the DWG library from Autodesk
- external drawing data interchange with almost
every graphics program in the world using DXF
- covers AutoCAD 2000(i) and Release 14,
AutoCAD LT 97/98/2000(i), many concepts also
valid in older versions

A note on AutoCAD 2002: AutoCAD 2002 uses the exact same file format as AutoCAD 2000. Therefore the contents of this book is also valid for this version. However, AutoCAD 2002 adds another method for working with AutoCAD objects. On this please read:
AutoCAD-Objekte in DesignXML.
A note on AutoCAD 2004: AutoCAD 2004 uses a different DWG file format, while the interfaces to the drawing contents (DXF, ActiveX and so on) remain mostly unchanged. Very few new objects and/or properties were introduced. Most of the contents of this book is therefore valid for the program's newest version. Note that DesignXML has been removed from AutoCAD 2004.
AutoCAD is the world's most widely used software
for Computer Aided Design and Drafting. According to
Autodesk, more than 2 million people use AutoCAD in
their daily work to define and document technical
designs or to store maps, site plans, and other
geometric data. This data is saved in AutoCAD drawing
files. Again according to Autodesk, more than 2
billion AutoCAD drawing files are on the computers
out there.
AutoCAD comes with a large set of commands and
features to create, manipulate, and query the
contents of a drawing file. But these built-in
commands deal with only a few of the almost unlimited
number of ways in which the contents of these files
can be used. Some obvious uses of the embedded
drawing data include statistics and report
generation, NC program and plot file generation, and
data exchange with other CAD or graphics products.
Consequently, there is a strong need to access a
drawing file's internals. This need is best
documented by the 1998 founding of the OpenDWG
alliance, an association of Autodesk competitors
formed to press for more access to AutoCAD drawing
files.
This book covers many ways to read, write,
evaluate, and manipulate the contents of AutoCAD
drawing files. Some of these ways require no more
than your being able to use a text editor or even a
sheet of paper. Others require that you learn one of
a dozen computer programming languages. Of course,
this book cannot teach you all these languages. There
are many other books available for that purpose.
However, no matter which procedure you use to
access the data embedded in a drawing file, you are
always faced with the same questions: What is the
meaning of the data? Which objects can be found in a
computer-generated drawing? Which properties are used
to define these objects? What kinds of values are
allowed, and how are they formatted?
The answer to these questions is what this book is
about: the contents of an AutoCAD drawing file. You
will learn about all you may encounter when
evaluating a drawing, which is usually called a
drawing database. I will describe the various ways to
find or manipulate objects, the items such as lines
and circles that constitute the drawing database. My
main goal, however, is to describe the meaning and
attributes of each object.
Isn't It Obvious?
But do you really need an entire book to describe
the contents of a drawing file? What's so complicated
about the lines and circles that make up a drawing?
Two things: First, there are many more objects
embedded in a drawing file than lines and circles.
Dimensions, spline curves, cubes, and even terrain
models can be part of a drawing file, and you need to
understand them in order to process and handle these
objects. Second, even for objects that seem to be as
simple as lines and circles, AutoCAD saves and uses a
large number of properties, many of them quite
difficult to understand.
A good example is the point object. If you were to
list all the things needed to define a point, how
many properties would you need? And which? In 2D,
that means on a sheet of paper, you would need two
distances to describe the point: the distance from
the left edge of the sheet (called X) and the
distance from the bottom edge (called Y). In
mathematical terms, these distances are called
coordinates. In a three-dimensional space, for
example, your office, you will need a set of three
coordinates to define the point: its distance from
the left wall, its distance from the back wall, and
its height above the floor.
If you think more in terms of computer graphics
than in terms of mathematical definitions, you will
also add another property to your list: the color in
which the point is displayed on the screen or on
paper. In addition, most graphics programs use a
layer property to group related objects.
But could you imagine giving your point a
direction? Probably not. However, AutoCAD does. And
it not only saves one direction with each point, it
saves two! And to make things even more complicated,
it even gives your point a height or a thickness. Now
that's strange, isn't it? What is a thick point? As
you will see, it's a certain arrangement of planar
faces arranged in 3D. You wouldn't call this a point,
but AutoCAD does.
Some AutoCAD objects are easy to understand. For
others you need detailed knowledge of how AutoCAD
creates, manipulates, and saves drawing data. This is
why I wrote this book, and in it you will find all
you need to know about the contents of an AutoCAD
drawing file, and maybe more.