To get the most out of the power of AutoCAD, you must be able to extract information from AutoCAD objects. When an object is created, AutoCAD does more than just draw the object on the computer screen. It creates a list of object data and stores this data in the drawing’s database. This data includes not only the layer, color, and linetype of an object, but also the X,Y,Z coordinate values of an object’s critical elements, such as the center of a circle, or the endpoint of a line. The data can include the names of blocks, as well as their X,Y,Z scale and rotation angles. Information about block attributes and their text values can be extracted from the drawing into a text file. The two-dimensional area of closed polygons, as well as three-dimensional volumes of objects can be determined. By querying AutoCAD’s objects, you can extract a wealth of information pertinent to your work, and you can query important data that AutoCAD creates automatically.
This chapter discusses the following topics:
Obtaining object information
Inquiry tools
Querying for areas in blocks and xrefs
Understanding block attributes
Creation of block attributes
Using attribute tools
The ATTEXT and EATTEXT commands
Extracting block and attribute data