0% found this document useful (0 votes)
300 views188 pages

Autocad 2002

Uploaded by

Alberto Pérez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
300 views188 pages

Autocad 2002

Uploaded by

Alberto Pérez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 188

AutoCAD 2002

DXF Reference Guide

Copyright 2001 Autodesk, Inc.


All Rights Reserved
AUTODESK, INC. MAKES NO WARRANTY, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, REGARDING THESE MATERIALS AND MAKES SUCH MATERIALS AVAILABLE SOLELY ON AN AS-IS BASIS. IN NO EVENT SHALL AUTODESK, INC. BE LIABLE TO ANYONE FOR SPECIAL, COLLATERAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION WITH OR ARISING OUT OF PURCHASE OR USE OF THESE MATERIALS. THE SOLE AND EXCLUSIVE LIABILITY TO AUTODESK, INC., REGARDLESS OF THE FORM OF ACTION, SHALL NOT EXCEED THE PURCHASE PRICE OF THE MATERIALS DESCRIBED HEREIN. Autodesk, Inc. reserves the right to revise and improve its products as it sees fit. This publication describes the state of this product at the time of its publication, and may not reflect the product at all times in the future. Autodesk Trademarks
The following are registered trademarks of Autodesk, Inc., in the USA and/or other countries: 3D Plan, 3D Props, 3D Studio, 3D Studio MAX, 3D Studio VIZ, 3DSurfer, ActiveShapes, ActiveShapes (logo), Actrix, ADE, ADI, Advanced Modeling Extension, AEC Authority (logo), AEC-X, AME, Animator Pro, Animator Studio, ATC, AUGI, AutoCAD, AutoCAD Data Extension, AutoCAD Development System, AutoCAD LT, AutoCAD Map, Autodesk, Autodesk Animator, Autodesk (logo), Autodesk MapGuide, Autodesk University, Autodesk View, Autodesk WalkThrough, Autodesk World, AutoLISP, AutoShade, AutoSketch, AutoSurf, AutoVision, Biped, bringing information down to earth, CAD Overlay, Character Studio, Design Companion, Design Your World, Design Your World (logo), Drafix, Education by Design, Generic, Generic 3D Drafting, Generic CADD, Generic Software, Geodyssey, Heidi, HOOPS, Hyperwire, Inside Track, Kinetix, MaterialSpec, Mechanical Desktop, Multimedia Explorer, NAAUG, ObjectARX, Office Series, Opus, PeopleTracker, Physique, Planix, Powered with Autodesk Technology, Powered with Autodesk Technology (logo), RadioRay, Rastation, Softdesk, Softdesk (logo), Solution 3000, Tech Talk, Texture Universe, The AEC Authority, The Auto Architect, TinkerTech, VISION, WHIP!, WHIP! (logo), Woodbourne, WorkCenter, and World-Creating Toolkit. The following are trademarks of Autodesk, Inc., in the USA and/or other countries: 3D on the PC, 3ds max, ACAD, Advanced User Interface, AEC Office, AME Link, Animation Partner, Animation Player, Animation Pro Player, A Studio in Every Computer, ATLAST, Auto-Architect, AutoCAD Architectural Desktop, AutoCAD Architectural Desktop Learning Assistance, AutoCAD Learning Assistance, AutoCAD LT Learning Assistance, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk Animator Clips, Autodesk Animator Theatre, Autodesk Device Interface, Autodesk Inventor, Autodesk PhotoEDIT, Autodesk Point A (logo), Autodesk Software Developer's Kit, Autodesk Streamline, Autodesk View DwgX, AutoFlix, AutoPAD, AutoSnap, AutoTrack, Built with ObjectARX (logo), ClearScale, Colour Warper, Combustion, Concept Studio, Content Explorer, cornerStone Toolkit, Dancing Baby (image), Design 2000 (logo), DesignCenter, Design Doctor, Designer's Toolkit, DesignProf, DesignServer, DWG Linking, DWG Unplugged, DXF, Extending the Design Team, FLI, FLIC, GDX Driver, Generic 3D, gmax, Heads-up Design, Home Series, i-drop, Kinetix (logo), Lightscape, ObjectDBX, onscreen onair online, OogaChaka, Photo Landscape, Photoscape, Plugs and Sockets, PolarSnap, Pro Landscape, QuickCAD, Real-Time Roto, Render Queue, SchoolBox, Simply Smarter Diagramming, SketchTools, Sparks, Suddenly Everything Clicks, Supportdesk, The Dancing Baby, Transform Ideas Into Reality, Visual LISP, Visual Syllabus, VIZable, Volo, and Where Design Connects.

Third Party Trademarks


All other brand names, product nam es or trademarks belong to their respective holders.

Third Party Software Program Credits


ACIS Copyright 1989-2001 Spatial C orp. Copyright 1997 Microsoft Corporation. All rights reserved. International C orrectSpell Spelling Correction System 1995 by Lernout & Hauspie Speech Products, N.V. All rights reserved. InstallShield 3.0. Copyright 1997 InstallShield Software C orporation. All rights reserved. Portions Copyright 1991-1996 Arthur D. Applegate. All rights reserved. Portions of this software are based on the work of the Independent JPEG Group. Typefaces from the Bitstream typeface library copyright 1992. Typefaces from Payne Loving Trust 1996. All rights reserved.

GOVERNMENT USE
Use, duplication, or disclosure by the U. S. Governm ent is subject to restrictions as set forth in FAR 12.212 (C om mercial Computer Software-Restricted Rights) and DFA R 227.7202 (Rights in Technical Data and Com puter Software), as applicable.

1 2 3 4 5 6 7 8 9 10

Contents

Revisions to the DXF Reference .


Objects Section . . . . . . . .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
. .

.
.

1
.2

Chapter 1

DXF Format

.
. . . . .

.
. . . . .

.
. . . . .

.
. . . . .

.
. . . . . . . . . .

.
. . . . .

5
.6 .6 .6 .7 .9

Organization of This Reference . . . . . . Formatting Conventions in This Reference. Object and Entity Codes . . . . . . . . Group Code Value Types . . . . . . . . Group Codes in Numerical Order . . . . .

Chapter 2

HEADER Section .

.
. . .

.
. . .

.
. . .

.
. . .

.
. . . . . .

.
. . .

. 15
16 27 28

HEADER Section Group Codes . . . . . . Revised VPORT Header Variables . . . . Special Handling of Date/Time Variables .

Chapter 3

CLASSES Section .

.
. . . .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. . . .

.
. .

. 31
32 33

CLASSES Section Group Codes Default Class Values . .

Chapter 4

TABLES Section .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. .

.
. . . .

.
. .

. 35
36 36

Symbol Table Group Codes . . . . Common Symbol Table Group Codes .

iii

Common Group Codes for Symbol Table Entries . APPID . . . . . . . . . . . . . . . . BLOCK_RECORD . . . . . . . . . . . . . DIMSTYLE . . . . . . . . . . . . . . . LAYER . . . . . . . . . . . . . . . . LTYPE . . . . . . . . . . . . . . . . STYLE . . . . . . . . . . . . . . . . UCS . . . . . . . . . . . . . . . . . VIEW . . . . . . . . . . . . . . . . VPORT . . . . . . . . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

37 38 39 40 44 45 46 47 49 51

Chapter 5

BLOCKS Section .

.
. . .

.
. . .

.
. . . . . .

.
. . .

.
. . .

.
. . .

.
. . .

.
. . .

.
. . .

.
. . .

.
. . . . . .

. 55
56 56 58

BLOCKS Section Group Codes BLOCK . . . . . . . . ENDBLK . . . . . . .

Chapter 6

ENTITIES Section .

.
. . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 59
60 62 63 63 64 65 66 68 69 69 69 71 72 73 74 75 76 76 77 78 80 83 83 85 86 88

Common Group Codes for Entities . . . . . . 3DFACE . . . . . . . . . . . . . . 3DSOLID . . . . . . . . . . . . . . ACAD_PROXY_ENTITY . . . . . . . . . . ARC . . . . . . . . . . . . . . . . ATTDEF . . . . . . . . . . . . . . . ATTRIB . . . . . . . . . . . . . . . BODY . . . . . . . . . . . . . . . CIRCLE . . . . . . . . . . . . . . . DIMENSION . . . . . . . . . . . . . Common Dimension Group Codes . . . . Aligned Dimension Group Codes. . . . . Linear and Rotated Dimension Group Codes . Radial and Diameter Dimension Group Codes Angular Dimension Group Codes. . . . . Ordinate Dimension Group Codes . . . . Dimension Style Overrides . . . . . . . ELLIPSE . . . . . . . . . . . . . . . ELLIPSE Commands Parameter Option . . . HATCH . . . . . . . . . . . . . . . Boundary Path Data . . . . . . . . . Pattern Data . . . . . . . . . . . IMAGE . . . . . . . . . . . . . . . INSERT . . . . . . . . . . . . . . . LEADER. . . . . . . . . . . . . . . LINE . . . . . . . . . . . . . . . .

iv

Contents

LWPOLYLINE . . . MLINE. . . . . . MTEXT . . . . . OLEFRAME . . . . OLE2FRAME . . . . POINT . . . . . . POLYLINE . . . . Polyface Meshes . RAY . . . . . . REGION . . . . . SEQEND . . . . . SHAPE . . . . . . SOLID . . . . . . SPLINE . . . . . TEXT . . . . . . TOLERANCE . . . . TRACE. . . . . . VERTEX . . . . . VIEWPORT . . . . XLINE . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. 88 . 89 . 92 . 93 . 94 . 96 . 97 . 98 . 99 . 99 100 100 101 102 103 105 106 107 109 113

Chapter 7

OBJECTS Section

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

. 115
116 116 116 117 118 119 120 121 122 124 125 125 126 127 128 128 131 132 133 135 136 137

OBJECT Section Group Codes . . Object Ownership . . . . Common Group Codes for Objects ACAD_PROXY_OBJECT . . . . ACDBDICTIONARYWDFLT . . . ACDBPLACEHOLDER . . . . . DICTIONARY . . . . . . . DICTIONARYVAR . . . . . . DIMASSOC . . . . . . . . GROUP . . . . . . . . . IDBUFFER . . . . . . . . IMAGEDEF . . . . . . . . IMAGEDEF_REACTOR. . . . . LAYER_INDEX . . . . . . . LAYER_FILTER . . . . . . . LAYOUT . . . . . . . . . MLINESTYLE. . . . . . . . OBJECT_PTR . . . . . . . . PLOTSETTINGS . . . . . . . RASTERVARIABLES. . . . . . SPATIAL_INDEX . . . . . . SPATIAL_FILTER . . . . . .

Contents

SORTENTSTABLE. VBA_PROJECT . XRECORD . . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. . .

. 138 . 139 . 140

Chapter 8

THUMBNAILIMAGE Section .

.
.

.
.

.
.

.
.

.
.

.
.

.
.

.
.

143
. 144

THUMBNAILIMAGE Section Group Codes.

Appendix A Drawing Interchange File Formats

.
. . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . .

. 145
. . . . . . . . . . . . . . . . . . 146 146 147 147 148 148 149 149 152 153 153 154 154 156 158 159 162 163

ASCII DXF Files . . . . . . . . . . . General DXF File Structure . . . . . . Group Codes in DXF Files . . . . . . ASCII Control Characters in DXF Files Header Group Codes in DXF Files . . . Class Group Codes in DXF Files . . . . Symbol Table Group Codes in DXF Files . Symbol Table Example . . . . . Blocks Group Codes in DXF Files . . . . Entity Group Codes in DXF Files . . . . Object Group Codes in DXF Files . . . . Writing a DXF Interface Program . . . . Reading a DXF File . . . . . . Writing a DXF File . . . . . . Binary DXF Files . . . . . . . . . . . Slide Files . . . . . . . . . . . . . Old Slide Header . . . . . . . . . Slide Library Files. . . . . . . . . . .

Appendix B Advanced DXF Issues .

.
. . . . . . . . . . .

.
. . . . . . . . . . .

.
. . . . . . . . . . .

.
. . . . . . . . . . . . . . . . . . . . . .

.
. . . . . . . . . . .

.
. . . . . . . . . . .

. 165
. . . . . . . . . . . 166 166 167 167 167 168 168 170 170 173 175

Database Objects . . . . . . . . . . Persistent Inter-Object Reference Handles . . Pointer and Ownership References . . Hard and Soft References . . . . . Arbitrary Handles. . . . . . . . 1005 Group Codes . . . . . . . Subclass Markers . . . . . . . . . . Extension Dictionary and Persistent Reactors . Extended Data . . . . . . . . . . Object Coordinate Systems (OCS) . . . . Arbitrary Axis Algorithm . . . . . . .

Index

177

vi

Contents

Revisions to the DXF Reference

This topic lists the revisions to the DXF Reference from the last update to the DXF Reference. The version number of this DXF Reference is u16.1.01. Any updates to this reference will be available at http:// www.autodesk.com/techpubs/autocad/dxf/.

In this chapter
s Objects Section

Objects Section
s

New objects: DIMASSOC.

Revisions to the DXF Reference

Objects Section

DXF Format

1
In this chapter
s Organization of This Reference s Object and Entity Codes s Group Code Value Types s Group Codes in Numerical

The DXF format is a tagged data representation of all the information contained in an AutoCAD drawing file. Tagged data means that each data element in the file is preceded by an integer number that is called a group code. A group codes value indicates what type of data element follows. This value also indicates the meaning of a data element for a given object (or record) type. Virtually all user-specified information in a drawing file can be represented in DXF format.

Order

Organization of This Reference


The DXF Reference presents the DXF group codes found in DXF files and encountered by AutoLISP and ObjectARX applications. This chapter describes the general DXF conventions. The remaining chapters list the group codes organized by object type. The group codes are presented in the order they are found in a DXF file, and each chapter is named according to the associated section of a DXF file. Although the DXF file format is used as the organizing mechanism for this reference, specific information on the actual formatting of DXF files is found in appendix A, Drawing Interchange File Formats. Advanced concepts relating to DXF group codes as they pertain to both applications and DXF files is found in appendix B, Advanced DXF Issues. For descriptions of the AutoLISP functions that use group codes, see chapter 10, Using AutoLISP to Manipulate AutoCAD Objects, in the Visual LISP Developers Guide.

Formatting Conventions in This Reference


Each group code listed in this reference is presented by a numeric group code value and a description. All group codes can apply to DXF files, applications (AutoLISP or ObjectARX), or both. When the description of a code is different for applications and DXF files (or only applies to one or the other), the description is preceded by the following indicators: APP DXF Application-specific description DXF file-specific description

If the description is common to both DXF files and applications, no indicator is provided. Optional codes are indicated as optional in the description.

Object and Entity Codes


In the DXF format, the definition of objects differs from entities: objects have no graphical representation and entities do. For example, dictionaries are objects not entities. Entities are also referred to as graphical objects while objects are referred to as nongraphical objects.

Chapter 1

DXF Format

Entities appear in both the BLOCK and ENTITIES sections of the DXF file. The use of group codes in the two sections is identical. Some group codes that define an entity always appear; others are optional and appear only if their values differ from the defaults. Do not write programs that rely on the order given here. The end of an entity is indicated by the next 0 group, which begins the next entity or indicates the end of the section.

NOTE Accommodating DXF files from future releases of AutoCAD will be easier if you write your DXF processing program in a table-driven way, ignore undefined group codes, and make no assumptions about the order of group codes in an entity. With each new AutoCAD release, new group codes will be added to entities to accommodate additional features.

Group Code Value Types


Group codes define the type of the associated value as an integer, a floatingpoint number, or a string, according to the following table of group code ranges. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Group code value types
Code range 09 Group value type String (with the introduction of extended symbol names in AutoCAD 2000, the 255 character limit has been lifted. There is no explicit limit to the number of bytes per line, although most lines should fall within 2049 bytes) Double precision 3D point Double precision floating point value 16-bit integer value 32-bit integer value String (255-character maximum; less for Unicode strings) String (255-character maximum; less for Unicode strings)

1039 4059 6079 9099 100 102

Group Code Value Types

Group code value types (continued)


Code range 105 110119 120129 130139 140149 170179 210239 270279 280289 290299 300309 310319 320329 330369 370379 380389 390399 400409 410419 999 10001009 10101059 10601070 Group value type String representing hexadecimal (hex) handle value Double precision floating point value Double precision floating point value Double precision floating point value Double precision scalar floating-point value 16-bit integer value Double precision floating point value 16-bit integer value 16-bit integer value Boolean flag value Arbitrary text string String representing hex value of binary chunk String representing hex handle value String representing hex object IDs 16-bit integer value 16-bit integer value String representing hex handle value 16-bit integer value String Comment (string) String (same limits as indicated with 09 code range) Double precision floating point value 16-bit integer value

Chapter 1

DXF Format

Group code value types (continued)


Code range 1071 Group value type 32-bit integer value

Group Codes in Numerical Order


The following table gives the group code or group code range accompanied by an explanation of the group code value. In the table, fixed indicates that the group code always has the same purpose. If a group code isnt fixed, its purpose depends on the context. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Group codes by number
Group code 5 4 3 2 1 Description APP: persistent reactor chain APP: conditional operator (used only with ssget) APP: extended data (XDATA) sentinel (fixed) APP: entity name reference (fixed) APP: entity name. The name changes each time a drawing is opened. It is never saved (fixed) Text string indicating the entity type (fixed) Primary text value for an entity Name (attribute tag, block name, and so on) Other text or name values Entity handle; text string of up to 16 hexadecimal digits (fixed) Linetype name (fixed) Text style name (fixed) Layer name (fixed)

0 1 2 34 5 6 7 8

Group Codes in Numerical Order

Group codes by number (continued)


Group code 9 Description DXF: variable name identifier (used only in HEADER section of the DXF file) Primary point; this is the start point of a line or text entity, center of a circle, and so on DXF: X value of the primary point (followed by Y and Z value codes 20 and 30) APP: 3D point (list of three reals) Other points DXF: X value of other points (followed by Y value codes 2128 and Z value codes 3138) APP: 3D point (list of three reals) DXF: Y and Z values of the primary point DXF: Y and Z values of other points DXF: entitys elevation if nonzero Entitys thickness if nonzero (fixed) Double precision floating point values (text height, scale factors, and so on) Linetype scale; double precision floating point scalar value; default value is defined for all entity types Repeated double precision floating point value. Multiple 49 groups may appear in one entity for variable-length tables (such as the dash lengths in the LTYPE table). A 7x group always appears before the first 49 group to specify the table length Angles (output in degrees to DXF files and radians through AutoLISP and ObjectARX applications) Entity visibility; integer value; absence or 0 indicates visibility; 1 indicates invisibility Color number (fixed) Entities follow flag (fixed) Spacethat is, model or paper space (fixed)

10

1118

20, 30 2128, 3137 38 39 4048

48

49

5058

60

62 66 67

10

Chapter 1

DXF Format

Group codes by number (continued)


Group code 68 Description APP: identifies whether viewport is on but fully off screen; is not active or is off APP: viewport identification number Integer values, such as repeat counts, flag bits, or modes 32-bit integer values Subclass data marker (with derived class name as a string). Required for all objects and entity classes that are derived from another concrete class. The subclass data marker segregates data defined by different classes in the inheritance chain for the same object. This is in addition to the requirement for DXF names for each distinct concrete class derived from ObjectARX (see Subclass Markers on page 168) Control string, followed by {<arbitrary name> or }. Similar to the xdata 1002 group code, except that when the string begins with {, it can be followed by an arbitrary string whose interpretation is up to the application. The only other control string allowed is } as a group terminator. AutoCAD does not interpret these strings except during drawing audit operations. They are for application use Object handle for DIMVAR symbol table entry UCS origin (appears only if code 72 is set to 1) DXF: X value; APP: 3D point UCS X-axis (appears only if code 72 is set to 1) DXF: X value; APP: 3D vector UCS Y-axis (appears only if code 72 is set to 1) DXF: X value; APP: 3D vector DXF: Y value of UCS origin, UCS X-axis, and UCS Y-axis DXF: Z value of UCS origin, UCS X-axis, and UCS Y-axis Double precision floating point values (points, elevation, and DIMSTYLE settings, for example) 16-bit integer values, such as flag bits representing DIMSTYLE settings Extrusion direction (fixed) DXF: X value of extrusion direction APP: 3D extrusion direction vector

69 7078 9099 100

102

105 110

111

112

120122 130132 140149

170179 210

Group Codes in Numerical Order

11

Group codes by number (continued)


Group code 220, 230 270279 280289 290299 300309 310319 Description DXF: Y and Z values of the extrusion direction 16-bit integer values 16-bit integer values Boolean flag value Arbitrary text strings Arbitrary binary chunks with same representation and limits as 1004 group codes: hexadecimal strings of up to 254 characters represent data chunks of up to 127 bytes Arbitrary object handles; handle values that are taken as is. They are not translated during INSERT and XREF operations Soft-pointer handle; arbitrary soft pointers to other objects within same DXF file or drawing. Translated during INSERT and XREF operations Hard-pointer handle; arbitrary hard pointers to other objects within same DXF file or drawing. Translated during INSERT and XREF operations Soft-owner handle; arbitrary soft ownership links to other objects within same DXF file or drawing. Translated during INSERT and XREF operations Hard-owner handle; arbitrary hard ownership links to other objects within same DXF file or drawing. Translated during INSERT and XREF operations Lineweight enum value (AcDb::LineWeight). Stored and moved around as a 16-bit integer. Custom non-entity objects may use the full range, but entity classes only use 371379 DXF group codes in their representation, because AutoCAD and AutoLISP both always assume a 370 group code is the entitys lineweight. This allows 370 to behave like other common entity fields PlotStyleName type enum (AcDb::PlotStyleNameType). Stored and moved around as a 16-bit integer. Custom non-entity objects may use the full range, but entity classes only use 381389 DXF group codes in their representation, for the same reason as the Lineweight range above

320329

330339

340349

350359

360369

370379

380389

12

Chapter 1

DXF Format

Group codes by number (continued)


Group code 390399 Description String representing handle value of the PlotStyleName object, basically a hard pointer, but has a different range to make backward compatibility easier to deal with. Stored and moved around as an Object ID (a handle in DXF files) and a special type in AutoLISP. Custom non-entity objects may use the full range, but entity classes only use 391399 DXF group codes in their representation, for the same reason as the Lineweight range above 16-bit Integers String DXF: The 999 group code indicates that the line following it is a comment string. SAVEAS does not include such groups in a DXF output file, but OPEN honors them and ignores the comments. You can use the 999 group to include comments in a DXF file that youve edited ASCII string (up to 255 bytes long) in extended data Registered application name (ASCII string up to 31 bytes long) for extended data Extended data control string ({ or }) Extended data layer name Chunk of bytes (up to 127 bytes long) in extended data Entity handle in extended data; text string of up to 16 hexadecimal digits A point in extended data DXF: X value (followed by 1020 and 1030 groups) APP: 3D point DXF: Y and Z values of a point A 3D world space position in extended data DXF: X value (followed by 1021 and 1031 groups) APP: 3D point DXF: Y and Z values of a world space position A 3D world space displacement in extended data DXF: X value (followed by 1022 and 1032 groups) APP: 3D vector

400409 410419 999

1000 1001

1002 1003 1004 1005

1010

1020, 1030 1011

1021, 1031 1012

Group Codes in Numerical Order

13

Group codes by number (continued)


Group code 1022, 1032 1013 Description DXF: Y and Z values of a world space displacement A 3D world space direction in extended data DXF: X value (followed by 1022 and 1032 groups) APP: 3D vector DXF: Y and Z values of a world space direction Extended data double precision floating point value Extended data distance value Extended data scale factor Extended data 16-bit signed integer Extended data 32-bit signed long

1023, 1033 1040 1041 1042 1070 1071

14

Chapter 1

DXF Format

HEADER Section

2
In this chapter
s HEADER Section Group Codes

The group codes described in this chapter pertain only to DXF files. The HEADER section of a DXF file contains the settings of variables associated with the drawing. Each variable is specified by a 9 group code giving the variables name, followed by groups that supply the variables value. This chapter lists only the variables that are saved in the drawing file.

15

HEADER Section Group Codes


The following table lists the variables that are saved in a DXF file. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. DXF system variables
Variable $ACADMAINTVER $ACADVER Group code 70 1 Description Maintenance version number (should be ignored) The AutoCAD drawing database version number: AC1006 = R10, AC1009 = R11 and R12, AC1012 = R13, AC1014 = R14, AC1015 = AutoCAD 2000 Angle 0 direction 1 = Clockwise angles, 0 = Counterclockwise Attribute visibility: 0 = None, 1 = Normal, 2 = All Units format for angles Units precision for angles Current entity color number: 0 = BYBLOCK, 256 = BYLAYER Current entity linetype scale Entity linetype name, or BYBLOCK or BYLAYER Lineweight of new objects Plotstyle handle of new objects. If CEPSNTYPE is 3, then this value indicates the handle Plotstyle type of new objects: 0 = PlotStyle by layer 1 = PlotStyle by block 2 = PlotStyle by dictionary default 3 = PlotStyle by object ID/handle First chamfer distance Second chamfer distance

$ANGBASE $ANGDIR $ATTMODE $AUNITS $AUPREC $CECOLOR

50 70 70 70 70 62

$CELTSCALE $CELTYPE $CELWEIGHT $CPSNID

40 6 370 390

$CEPSNTYPE

380

$CHAMFERA $CHAMFERB

40 40

16

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $CHAMFERC $CHAMFERD $CLAYER $CMLJUST Group code 40 40 8 70 Description Chamfer length Chamfer angle Current layer name Current multiline justification: 0 = Top, 1 = Middle, 2 = Bottom Current multiline scale Current multiline style name Number of precision places displayed in angular dimensions Alternate unit dimensioning performed if nonzero Alternate unit decimal places Alternate unit scale factor Determines rounding of alternate units Number of decimal places for tolerance values of an alternate units dimension Controls suppression of zeros for alternate tolerance values: 0 = Suppresses zero feet and precisely zero inches 1 = Includes zero feet and precisely zero inches 2 = Includes zero feet and suppresses zero inches 3 = Includes zero inches and suppresses zero feet Units format for alternate units of all dimension style family members except angular: 1 = Scientific; 2 = Decimal; 3 = Engineering; 4 = Architectural (stacked); 5 = Fractional (stacked); 6 = Architectural; 7 = Fractional Controls suppression of zeros for alternate unit dimension values: 0 = Suppresses zero feet and precisely zero inches 1 = Includes zero feet and precisely zero inches 2 = Includes zero feet and suppresses zero inches 3 = Includes zero inches and suppresses zero feet Alternate dimensioning suffix

$CMLSCALE $CMLSTYLE $DIMADEC $DIMALT $DIMALTD $DIMALTF $DIMALTRND $DIMALTTD

40 2 70 70 70 40 40 70

$DIMALTTZ

70

$DIMALTU

70

$DIMALTZ

70

$DIMAPOST

HEADER Section Group Codes

17

DXF system variables (continued)


Variable $DIMASO Group code 70 Description 1 = Create associative dimensioning 0 = Draw individual entities Dimensioning arrow size Controls dimension text and arrow placement when space is not sufficient to place both within the extension lines: 0 = Places both text and arrows outside extension lines 1 = Moves arrows first, then text 2 = Moves text first, then arrows 3 = Moves either text or arrows, whichever fits best AutoCAD adds a leader to moved dimension text when DIMTMOVE is set to 1 Angle format for angular dimensions: 0 = Decimal degrees, 1 = Degrees/minutes/seconds, 2 = Gradians, 3 = Radians, 4 = Surveyors units Controls suppression of zeros for angular dimensions: 0 = Displays all leading and trailing zeros 1 = Suppresses leading zeros in decimal dimensions 2 = Suppresses trailing zeros in decimal dimensions 3 = Suppresses leading and trailing zeros Arrow block name First arrow block name Second arrow block name Size of center mark/lines Dimension line color: range is 0 = BYBLOCK, 256 = BYLAYER Dimension extension line color: range is 0 = BYBLOCK, 256 = BYLAYER Dimension text color: range is 0 = BYBLOCK, 256 = BYLAYER Number of decimal places for the tolerance values of a primary units dimension Dimension line extension Dimension line increment

$DIMASZ $DIMATFIT

40 70

$DIMAUNIT

70

$DIMAZIN

70

$DIMBLK $DIMBLK1 $DIMBLK2 $DIMCEN $DIMCLRD

1 1 1 40 70

$DIMCLRE

70

$DIMCLRT

70

$DIMDEC

70

$DIMDLE $DIMDLI

40 40

18

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $DIMDSEP Group code 70 Description Single-character decimal separator used when creating dimensions whose unit format is decimal Extension line extension Extension line offset Scale factor used to calculate the height of text for dimension fractions and tolerances. AutoCAD multiplies DIMTXT by DIMTFAC to set the fractional or tolerance text height Dimension line gap Horizontal dimension text position: 0 = Above dimension line and center-justified between extension lines 1 = Above dimension line and next to first extension line 2 = Above dimension line and next to second extension line 3 = Above and center-justified to first extension line 4 = Above and center-justified to second extension line Arrow block name for leaders Linear measurements scale factor Dimension limits generated if nonzero Sets units for all dimension types except Angular: 1 = Scientific; 2 = Decimal; 3 = Engineering; 4 = Architectural; 5 = Fractional; 6 = Windows desktop Dimension line lineweight: 3 = Standard 2 = ByLayer 1 = ByBlock 0211 = an integer representing 100th of mm Extension line lineweight: 3 = Standard 2 = ByLayer 1 = ByBlock 0211 = an integer representing 100th of mm General dimensioning suffix Rounding value for dimension distances Use separate arrow blocks if nonzero

$DIMEXE $DIMEXO $DIMFAC

40 40 40

$DIMGAP $DIMJUST

40 70

$DIMLDRBLK $DIMLFAC $DIMLIM $DIMLUNIT

1 40 70 70

$DIMLWD

70

$DIMLWE

70

$DIMPOST $DIMRND $DIMSAH

1 40 70

HEADER Section Group Codes

19

DXF system variables (continued)


Variable $DIMSCALE $DIMSD1 Group code 40 70 Description Overall dimensioning scale factor Suppression of first extension line: 0 = Not suppressed, 1 = Suppressed Suppression of second extension line: 0 = Not suppressed, 1 = Suppressed First extension line suppressed if nonzero Second extension line suppressed if nonzero 1 = Recompute dimensions while dragging 0 = Drag original image Suppress outside-extensions dimension lines if nonzero Dimension style name Text above dimension line if nonzero Number of decimal places to display the tolerance values Dimension tolerance display scale factor Text inside horizontal if nonzero Force text inside extensions if nonzero Minus tolerance Dimension text movement rules: 0 = Moves the dimension line with dimension text 1 = Adds a leader when dimension text is moved 2 = Allows text to be moved freely without a leader If text is outside extensions, force line extensions between extensions if nonzero Text outside horizontal if nonzero Dimension tolerances generated if nonzero Vertical justification for tolerance values: 0 = Top, 1 = Middle, 2 = Bottom

$DIMSD2

70

$DIMSE1 $DIMSE2 $DIMSHO

70 70 70

$DIMSOXD $DIMSTYLE $DIMTAD $DIMTDEC $DIMTFAC $DIMTIH $DIMTIX $DIMTM $DIMTMOVE

70 2 70 70 40 70 70 40 70

$DIMTOFL

70

$DIMTOH $DIMTOL $DIMTOLJ

70 70 70

20

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $DIMTP $DIMTSZ Group code 40 40 Description Plus tolerance Dimensioning tick size: 0 = No ticks Text vertical position Dimension text style Dimensioning text height Controls suppression of zeros for tolerance values: 0 = Suppresses zero feet and precisely zero inches 1 = Includes zero feet and precisely zero inches 2 = Includes zero feet and suppresses zero inches 3 = Includes zero inches and suppresses zero feet Cursor functionality for user positioned text: 0 = Controls only the dimension line location 1 = Controls the text position as well as the dimension line location Controls suppression of zeros for primary unit values: 0 = Suppresses zero feet and precisely zero inches 1 = Includes zero feet and precisely zero inches 2 = Includes zero feet and suppresses zero inches 3 = Includes zero inches and suppresses zero feet Controls the display of silhouette curves of body objects in Wireframe mode: 0 = Off, 1 = On Drawing code page; Set to the system code page when a new drawing is created, but not otherwise maintained by AutoCAD Current elevation set by ELEV command Lineweight endcaps setting for new objects: 0 = none; 1 = round; 2=angle; 3=square X, Y, and Z drawing extents upper-right corner (in WCS) X, Y, and Z drawing extents lower-left corner (in WCS)

$DIMTVP $DIMTXSTY $DIMTXT $DIMTZIN

40 7 40 70

$DIMUPT

70

$DIMZIN

70

$DISPSILH

70

$DWGCODEPAGE

$ELEVATION $ENDCAPS

40 280

$EXTMAX $EXTMIN

10, 20, 30 10, 20, 30

HEADER Section Group Codes

21

DXF system variables (continued)


Variable $EXTNAMES Group code 290 Description Controls symbol table naming: 0 = Release 14 compatibility. Limits names to 31 characters in length. Names can include the letters A to Z, the numerals 0 to 9, and the special characters, dollar sign ($), underscore (_), and hyphen (). 1 = AutoCAD 2000. Names can be up to 255 characters in length, and can include the letters A to Z, the numerals 0 to 9, spaces, and any special characters not used by Microsoft Windows and AutoCAD for other purposes Fillet radius Fill mode on if nonzero Set at creation time, uniquely identifies a particular drawing Next available handle Path for all relative hyperlinks in the drawing. If null, the drawing path is used Insertion base set by BASE command (in WCS) Default drawing units for AutoCAD DesignCenter blocks: 0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches; 9 = Mils; 10 = Yards; 11 = Angstroms; 12 = Nanometers; 13 = Microns; 14 = Decimeters; 15 = Decameters; 16 = Hectometers; 17 = Gigameters; 18 = Astronomical units; 19 = Light years; 20 = Parsecs Lineweight joint setting for new objects: 0=none; 1= round; 2 = angle; 3 = flat Nonzero if limits checking is on XY drawing limits upper-right corner (in WCS) XY drawing limits lower-left corner (in WCS) Global linetype scale Units format for coordinates and distances Units precision for coordinates and distances

$FILLETRAD $FILLMODE $FINGERPRINTGUID $HANDSEED $HYPERLINKBASE

40 70 2 5 1

$INSBASE $INSUNITS

10, 20, 30 70

$JOINSTYLE

280

$LIMCHECK $LIMMAX $LIMMIN $LTSCALE $LUNITS $LUPREC

70 10, 20 10, 20 40 70 70

22

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $LWDISPLAY Group code 290 Description Controls the display of lineweights on the Model or Layout tab: 0 = Lineweight is not displayed 1 = Lineweight is displayed Sets maximum number of viewports to be regenerated Sets drawing units: 0 = English; 1 = Metric Name of menu file Mirror text if nonzero Ortho mode on if nonzero Point Display mode Point display size Current paper space elevation Maximum X, Y, and Z extents for paper space Minimum X, Y, and Z extents for paper space Paper space insertion base point Limits checking in paper space when nonzero Maximum X and Y limits in paper space Minimum X and Y limits in paper space Governs the generation of linetype patterns around the vertices of a 2D polyline: 1 = Linetype is generated in a continuous pattern around vertices of the polyline 0 = Each segment of the polyline starts and ends with a dash Default polyline width Controls the saving of proxy object images Controls paper space linetype scaling: 1 = No special linetype scaling 0 = Viewport scaling governs linetype scaling

$MAXACTVP $MEASUREMENT $MENU $MIRRTEXT $ORTHOMODE $PDMODE $PDSIZE $PELEVATION $PEXTMAX $PEXTMIN $PINSBASE $PLIMCHECK $PLIMMAX $PLIMMIN $PLINEGEN

70 70 1 70 70 70 40 40 10, 20, 30 10, 20, 30 10, 20, 30 70 10, 20 10, 20 70

$PLINEWID $PROXYGRAPHICS $PSLTSCALE

40 70 70

HEADER Section Group Codes

23

DXF system variables (continued)


Variable $PSTYLEMODE Group code 290 Description Indicates whether the current drawing is in a Color-Dependent or Named Plot Style mode: 0 = Uses color-dependent plot style tables in the current drawing 1 = Uses named plot style tables in the current drawing View scale factor for new viewports: 0 = Scaled to fit >0 = Scale factor (a positive real value) Name of the UCS that defines the origin and orientation of orthographic UCS settings (paper space only) Current paper space UCS name Current paper space UCS origin Point which becomes the new UCS origin after changing paper space UCS to BACK when PUCSBASE is set to WORLD Point which becomes the new UCS origin after changing paper space UCS to BOTTOM when PUCSBASE is set to WORLD Point which becomes the new UCS origin after changing paper space UCS to FRONT when PUCSBASE is set to WORLD Point which becomes the new UCS origin after changing paper space UCS to LEFT when PUCSBASE is set to WORLD Point which becomes the new UCS origin after changing paper space UCS to RIGHT when PUCSBASE is set to WORLD Point which becomes the new UCS origin after changing paper space UCS to TOP when PUCSBASE is set to WORLD If paper space UCS is orthographic (PUCSORTHOVIEW not equal to 0), this is the name of the UCS that the orthographic UCS is relative to. If blank, UCS is relative to WORLD Orthographic view type of paper space UCS: 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right Current paper space UCS X axis Current paper space UCS Y axis

$PSVPSCALE

40

$PUCSBASE

$PUCSNAME $PUCSORG $PUCSORGBACK

2 10, 20, 30 10, 20, 30

$PUCSORGBOTTOM

10, 20, 30

$PUCSORGFRONT

10, 20, 30

$PUCSORGLEFT

10, 20, 30

$PUCSORGRIGHT

10, 20, 30

$PUCSORGTOP

10, 20, 30

$PUCSORTHOREF

$PUCSORTHOVIEW

70

$PUCSXDIR $PUCSYDIR

10, 20, 30 10, 20, 30

24

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $QTEXTMODE $REGENMODE $SHADEDGE Group code 70 70 70 Description Quick Text mode on if nonzero REGENAUTO mode on if nonzero 0 = Faces shaded, edges not highlighted 1 = Faces shaded, edges highlighted in black 2 = Faces not filled, edges in entity color 3 = Faces in entity color, edges in black Percent ambient/diffuse light, range 1100, default 70 Sketch record increment 0 = Sketch lines, 1 = Sketch polylines Spline control polygon display: 1 = On, 0 = Off Number of line segments per spline patch Spline curve type for PEDIT Spline Number of mesh tabulations in first direction Number of mesh tabulations in second direction Surface type for PEDIT Smooth Surface density (for PEDIT Smooth) in M direction Surface density (for PEDIT Smooth) in N direction Local date/time of drawing creation (see Special Handling of Date/ Time Variables) Cumulative editing time for this drawing (see Special Handling of Date/Time Variables) Universal date/time the drawing was created (see Special Handling of Date/Time Variables) Local date/time of last drawing update (see Special Handling of Date/Time Variables) User-elapsed timer

$SHADEDIF $SKETCHINC $SKPOLY $SPLFRAME $SPLINESEGS $SPLINETYPE $SURFTAB1 $SURFTAB2 $SURFTYPE $SURFU $SURFV $TDCREATE

70 40 70 70 70 70 70 70 70 70 70 40

$TDINDWG

40

$TDUCREATE

40

$TDUPDATE

40

$TDUSRTIMER

40

HEADER Section Group Codes

25

DXF system variables (continued)


Variable $TDUUPDATE Group code 40 Description Universal date/time of the last update/save (see Special Handling of Date/Time Variables) Default text height Current text style name Current thickness set by ELEV command 1 for previous release compatibility mode, 0 otherwise Default trace width Specifies the maximum depth of the spatial index Name of the UCS that defines the origin and orientation of orthographic UCS settings Name of current UCS Origin of current UCS (in WCS) Point which becomes the new UCS origin after changing model space UCS to BACK when UCSBASE is set to WORLD Point which becomes the new UCS origin after changing model space UCS to BOTTOM when UCSBASE is set to WORLD Point which becomes the new UCS origin after changing model space UCS to FRONT when UCSBASE is set to WORLD Point which becomes the new UCS origin after changing model space UCS to LEFT when UCSBASE is set to WORLD Point which becomes the new UCS origin after changing model space UCS to RIGHT when UCSBASE is set to WORLD Point which becomes the new UCS origin after changing model space UCS to TOP when UCSBASE is set to WORLD If model space UCS is orthographic (UCSORTHOVIEW not equal to 0), this is the name of the UCS that the orthographic UCS is relative to. If blank, UCS is relative to WORLD

$TEXTSIZE $TEXTSTYLE $THICKNESS $TILEMODE $TRACEWID $TREEDEPTH $UCSBASE

40 7 40 70 40 70 2

$UCSNAME $UCSORG $UCSORGBACK

2 10, 20, 30 10, 20, 30

$UCSORGBOTTOM

10, 20, 30

$UCSORGFRONT

10, 20, 30

$UCSORGLEFT

10, 20, 30

$UCSORGRIGHT

10, 20, 30

$UCSORGTOP

10, 20, 30

$UCSORTHOREF

26

Chapter 2

HEADER Section

DXF system variables (continued)


Variable $UCSORTHOVIEW Group code 70 Description Orthographic view type of model space UCS: 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right Direction of the current UCS X axis (in WCS) Direction of the current UCS Y axis (in WCS) Low bit set = Display fractions, feet-and-inches, and surveyors angles in input format Five integer variables intended for use by third-party developers Five real variables intended for use by third-party developers 0 = Timer off, 1 = Timer on Uniquely identifies a particular version of a drawing. Updated when the drawing is modified 0 = Dont retain xref-dependent visibility settings 1 = Retain xref-dependent visibility settings 1 = Set UCS to WCS during DVIEW/VPOINT 0 = Dont change UCS Controls whether the current drawing can be edited in-place when being referenced by another drawing. 0 = Cant use in-place reference editing 1 = Can use in-place reference editing

$UCSXDIR $UCSYDIR $UNITMODE

10, 20, 30 10, 20, 30 70

$USERI1 5 $USERR1 5 $USRTIMER $VERSIONGUID

70 40 70 2

$VISRETAIN

70

$WORLDVIEW

70

$XEDIT

290

Revised VPORT Header Variables


The following header variables existed before AutoCAD Release 11 but now have independent settings for each active viewport. OPEN honors these variables when read from DXF files. If a VPORT symbol table with *ACTIVE entries is present (as is true for any DXF file produced by Release 11 or later),

HEADER Section Group Codes

27

the values in the VPORT table entries override the values of these header variables. Revised VPORT header variables
Variable $FASTZOOM $GRIDMODE $GRIDUNIT $SNAPANG $SNAPBASE $SNAPISOPAIR $SNAPMODE $SNAPSTYLE $SNAPUNIT $VIEWCTR $VIEWDIR $VIEWSIZE Group code 70 70 10, 20 50 10, 20 70 70 70 10, 20 10, 20 10, 20, 30 40 Description Fast zoom enabled if nonzero Grid mode on if nonzero Grid X and Y spacing Snap grid rotation angle Snap/grid base point (in UCS) Isometric plane: 0 = Left, 1 = Top, 2 = Right Snap mode on if nonzero Snap style: 0 = Standard, 1 = Isometric Snap grid X and Y spacing XY center of current view on screen Viewing direction (direction from target in WCS) Height of view

Special Handling of Date/Time Variables


The CDATE and DATE system variables provide access to the current date and time. The TDCREATE, TDINDWG, TDUPDATE, and TDUSRTIMER system variables (and the $TDCREATE, $TDUCREATE, $TDUPDATE, and $TDUUPDATE DXF header variables) provide access to times and dates associated with the current drawing. The values are represented as real numbers with special meanings, as described below.
DATE is the current date and time represented as a Julian date and fraction of a day in a real number.

<Julian date>.<Fraction of day>

28

Chapter 2

HEADER Section

For example, on December 31, 1999, at 9:58:35 p.m. GMT, the DATE variable contains 2451544.91568287 The date and time are taken from the computers clock when the variable is read. The time is represented as a fraction of a day, do the times returned by DATE may be truly subtracted to compute differences in time. To extract the seconds since midnight from the value returned by DATE, use the AutoLISP expressions:
(setq s (getvar "DATE")) (setq seconds (* 86400.0 (- s (fix s))))

Note that DATE only returns a true Julian date if the systems clock is set to UTC/Zulu (Greenwich Mean Time). TDCREATE and TDUPDATE have the same format as DATE, but their values represent the creation time and last update time of the current drawing.
TDINDWG and TDUSRTIMER (and the $TDINDWG and $TDUSRTIMER DXF header variables) use a format similar to that of DATE, but their values represent elapsed times, as in:

<Number of days>.<Fraction of day>


CDATE is the current date and time in calendar and clock format. The value is returned as a real number in the form:

YYYYMMDD.HHMMSShsec where: YYYY = year MM = month (01-12) DD = day (01-31) HH = hours (00-23) MM = minutes (00-59) SS = seconds (00-59) hsec = hundredths of a second (00-99) For example, if the current date is December 31, 1999, and the time is 9:58:35.75 p.m., CDATE would return the value: 19991231.21583575 Note that CDATE values can be compared for later and earlier values but that subtracting them yields numbers that are not meaningful.

HEADER Section Group Codes

29

30

CLASSES Section

3
In this chapter
s CLASSES Section Group Codes

The group codes described in this chapter are found only in DXF files. The CLASSES section holds the information for application-defined classes whose instances appear in the BLOCKS, ENTITIES, and OBJECTS sections of the database. It is assumed that a class definition is permanently fixed in the class hierarchy. All fields are required.

31

CLASSES Section Group Codes


Each entry in the CLASSES section contains the groups described in the following table. CLASSES section group codes
Group code 0 1 2 Description Record type (CLASS). Identifies beginning of a CLASS record Class DXF record name; always unique C++ class name. Used to bind with software that defines object class behavior; always unique Application name. Posted in Alert box when a class definition listed in this section is not currently loaded Proxy capabilities flag. Bit-coded value that indicates the capabilities of this object as a proxy: 0 = No operations allowed (0) 1 = Erase allowed (0x1) 2 = Transform allowed (0x2) 4 = Color change allowed (0x4) 8 = Layer change allowed (0x8) 16 = Linetype change allowed (0x10) 32 = Linetype scale change allowed (0x20) 64 = Visibility change allowed (0x40) 128 = Cloning allowed (0x80) 256 = Lineweight change allowed (0x100) 512 = Plot Style Name change allowed (0x200) 895 = All operations except cloning allowed (0x37F) 1023 = All operations allowed (0x3FF) 32768 = R13 format proxy (0x8000) Was-a-proxy flag. Set to 1 if class was not loaded when this DXF file was created, and 0 otherwise Is-an-entity flag. Set to 1 if class was derived from the AcDbEntity class and can reside in the BLOCKS or ENTITIES section. If 0, instances may appear only in the OBJECTS section

90

280

281

32

Chapter 3

CLASSES Section

Default Class Values


AutoCAD registers the classes listed in the following table. (This may not be a complete list of the classes found in a DXF file. It depends on the applications currently in use by AutoCAD .) Default class values
DXF record name code 1 ACDBDICTIONARYWDFLT ACDBPLACEHOLDER ARCALIGNEDTEXT DICTIONARYVAR HATCH IDBUFFER IMAGE IMAGEDEF IMAGEDEF_REACTOR LAYER_INDEX LAYOUT LWPOLYLINE OBJECT_PTR OLE2FRAME PLOTSETTINGS RASTERVARIABLES RTEXT C++ class name code 2 AcDbDictionaryWithDefault AcDbPlaceHolder AcDbArcAlignedText AcDbDictionaryVar AcDbHatch AcDbIdBuffer AcDbRasterImage AcDbRasterImageDef AcDbRasterImageDefReactor AcDbLayerIndex AcDbLayout AcDbPolyline CAseDLPNTableRecord AcDbOle2Frame AcDbPlotSettings AcDbRasterVariables RText Code Code Code 90 280 281 0 0 0 0 0 0 127 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0 1

CLASSES Section Group Codes

33

Default class values (continued)


DXF record name code 1 SORTENTSTABLE SPATIAL_INDEX SPATIAL_FILTER WIPEOUT WIPEOUTVARIABLES C++ class name code 2 AcDbSortentsTable AcDbSpatialIndex AcDbSpatialFilter AcDbWipeout AcDbWipeoutVariables Code Code Code 90 280 281 0 0 0 127 0 0 0 0 0 0 0 0 0 1 0

34

Chapter 3

CLASSES Section

TABLES Section

4
In this chapter
s Symbol Table Group Codes s Common Symbol Table Group

The group codes described in this chapter are found in DXF files and used by applications. The TABLES section contains several tables, each of which can contain a variable number of entries. These codes are also used by AutoLISP and ObjectARX applications in entity definition lists.

Codes
s APPID s BLOCK_RECORD s DIMSTYLE s LAYER s LTYPE s STYLE s UCS s VIEW s VPORT

35

Symbol Table Group Codes


The order of the tables may change, but the LTYPE table always precedes the LAYER table. Each table is introduced with a 0 group code with the label TABLE. This is followed by a 2 group code identifying the particular table (APPID, DIMSTYLE, LAYER, LTYPE, STYLE, UCS, VIEW, VPORT, or BLOCK_RECORD), a 5 group code (a handle), a 100 group code (AcDbSymbolTable subclass marker), and a 70 group code that specifies the maximum number of table entries that may follow. Table names are output in uppercase characters. The DIMSTYLE handle is a 105 group code not a 5 group code. The tables in a drawing can contain deleted items, but these are not written to the DXF file. As a result, fewer table entries may follow the table header than are indicated by the 70 group code, so do not use the count in the 70 group code as an index to read in the table. This group code is provided so that a program that reads DXF files can allocate an array large enough to hold all the table entries that follow. Following this header for each table are the table entries. Each table entry consists of a 0 group identifying the item type (same as table name, such as LTYPE or LAYER), a 2 group giving the name of the table entry, a 70 group specifying flags relevant to the table entry (defined for each following table), and additional groups that give the value of the table entry. The end of each table is indicated by a 0 group with the value ENDTAB. Both symbol table records and symbol tables are database objects. At a very minimum, with all prevailing usage within AutoCAD , this implies that a handle is present, positioned after the 2 group codes for both the symbol table record objects and the symbol table objects. The DIMSTYLE table is the only record type in the system with a handle code of 105 because of its earlier usage of group code 5. As a rule, programmers should not be concerned about this exception unless it is in the context of the DIMSTYLE table section. This is the only context in which this exception should occur.

Common Symbol Table Group Codes


The following table shows group codes that apply to all symbol tables. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

36

Chapter 4

TABLES Section

Group codes that apply to all symbol tables


Group code 1 0 2 5 102 Description APP: entity name (changes each time a drawing is opened) Object type (TABLE) Table name Handle {ACAD_XDICTIONARY indicates the start of an extension dictionary group. This group exists only if persistent reactors have been attached to this object (optional) Hard owner ID/handle to owner dictionary (optional) End of group, } (optional) Soft-pointer ID/handle to owner object Subclass marker (AcDbSymbolTable) Maximum number of entries in table

360 102 330 100 70

Common Group Codes for Symbol Table Entries


The following table shows group codes that apply to all symbol table entries. When you refer to the table of group codes by entity type, which lists the codes associated with specific entities, keep in mind that the codes shown here can also be present. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Group codes that apply to all symbol table entries
Group code 1 0 5 105 Description APP: entity name (changes each time a drawing is opened) Entity type (table name) Handle (all except DIMSTYLE) Handle (DIMSTYLE table only)

Common Symbol Table Group Codes

37

Group codes that apply to all symbol table entries (continued)


Group code 102 Description Start of application-defined group {application_name. For example, {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group (optional) Codes and values within the 102 groups are application defined (optional) End of group, } (optional) {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group. This group exists only if persistent reactors have been attached to this object (optional) Soft pointer ID/handle to owner dictionary (optional) End of group, } (optional) {ACAD_XDICTIONARY indicates the start of an extension dictionary group. This group exists only if persistent reactors have been attached to this object (optional) Hard owner ID/handle to owner dictionary (optional) End of group, } (optional) Soft-pointer ID/handle to owner object Subclass marker (AcDbSymbolTableRecord)

applicationdefined codes 102 102

330 102 102

360 102 330 100

APPID
The following group codes apply to APPID symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

38

Chapter 4

TABLES Section

APPID group codes


Group codes 100 2 Description Subclass marker (AcDbRegAppTableRecord) User-supplied (or application-supplied) application name (for extended data). These table entries maintain a set of names for all registered applications Standard flag values (bit-coded values): 1 = If set, xdata associated with this APPID is not written when SAVEASR12 is performed 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCADcommands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files)

70

BLOCK_RECORD
The following group codes apply to BLOCK_RECORD symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. BLOCK_RECORD group codes
Group codes 100 2 340 310 1001 Description Subclass marker (AcDbBlockTableRecord) Block name Hard-pointer ID/handle to associated LAYOUT object DXF: Binary data for bitmap preview (optional) Xdata application name ACAD (optional)

BLOCK_RECORD

39

BLOCK_RECORD group codes (continued)


Group codes 1000 1002 1070 1070 Description Xdata string data DesignCenter Data (optional) Begin xdata { (optional) Autodesk Design Center version number Insert units: 0 = Unitless; 1 = Inches; 2 = Feet; 3 = Miles; 4 = Millimeters; 5 = Centimeters; 6 = Meters; 7 = Kilometers; 8 = Microinches; 9 = Mils; 10 = Yards; 11 = Angstroms; 12 = Nanometers; 13 = Microns; 14 = Decimeters; 15 = Decameters; 16 = Hectometers; 17 = Gigameters; 18 = Astronomical units; 19 = Light years; 20 = Parsecs End xdata }

1002

DIMSTYLE
The following group codes apply to DIMSTYLE symbol table entries. The DIMSTYLE system variables are described in appendix B, System Variables, in the Command Reference. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. DIMSTYLE group codes
Group codes 100 2 70 Description Subclass marker (AcDbDimStyleTableRecord) Dimension style name Standard flag values (bit-coded values): 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files)

40

Chapter 4

TABLES Section

DIMSTYLE group codes (continued)


Group codes 3 4 5 6 7 40 41 42 43 44 45 46 47 48 140 141 142 143 144 145 146 147 148 Description DIMPOST DIMAPOST DIMBLK (obsolete, now object ID) DIMBLK1 (obsolete, now object ID) DIMBLK2 (obsolete, now object ID) DIMSCALE DIMASZ DIMEXO DIMDLI DIMEXE DIMRND DIMDLE DIMTP DIMTM DIMTXT DIMCEN DIMTSZ DIMALTF DIMLFAC DIMTVP DIMTFAC DIMGAP DIMALTRND

DIMSTYLE

41

DIMSTYLE group codes (continued)


Group codes 71 72 73 74 75 76 77 78 79 170 171 172 173 174 175 176 177 178 179 270 271 272 273 Description DIMTOL DIMLIM DIMTIH DIMTOH DIMSE1 DIMSE2 DIMTAD DIMZIN DIMAZIN DIMALT DIMALTD DIMTOFL DIMSAH DIMTIX DIMSOXD DIMCLRD DIMCLRE DIMCLRT DIMADEC DIMUNIT (obsolete, now use DIMLUNIT AND DIMFRAC) DIMDEC DIMTDEC DIMALTU

42

Chapter 4

TABLES Section

DIMSTYLE group codes (continued)


Group codes 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 340 341 342 343 344 371 372 Description DIMALTTD DIMAUNIT DIMFRAC DIMLUNIT DIMDSEP DIMTMOVE DIMJUST DIMSD1 DIMSD2 DIMTOLJ DIMTZIN DIMALTZ DIMALTTZ DIMFIT (obsolete, now use DIMATFIT and DIMTMOVE) DIMUPT DIMATFIT DIMTXSTY (handle of referenced STYLE) DIMLDRBLK (handle of referenced BLOCK) DIMBLK (handle of referenced BLOCK) DIMBLK1 (handle of referenced BLOCK) DIMBLK2 (handle of referenced BLOCK) DIMLWD (lineweight enum value) DIMLWE (lineweight enum value)

DIMSTYLE

43

LAYER
The following group codes apply to LAYER symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. LAYER group codes
Group codes 100 2 70 Description Subclass marker (AcDbLayerTableRecord) Layer name Standard flags (bit-coded values): 1 = Layer is frozen; otherwise layer is thawed 2 = Layer is frozen by default in new viewports 4 = Layer is locked 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) Color number (if negative, layer is off) Linetype name Plotting flag. If set to 0, do not plot this layer Lineweight enum value Hard pointer ID/handle of PlotStyleName object

62 6 290 370 390

Xref-dependent layers are output during SAVEAS . For these layers, the associated linetype name in the DXF file is always CONTINUOUS.

44

Chapter 4

TABLES Section

LTYPE
The following group codes apply to LTYPE symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. LTYPE group codes
Group codes 100 2 70 Description Subclass marker (AcDbLinetypeTableRecord) Linetype name Standard flag values (bit-coded values): 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) Descriptive text for linetype Alignment code; value is always 65, the ASCII code for A The number of linetype elements Total pattern length Dash, dot or space length (one entry per element) Complex linetype element type (one per element). Default is 0 (no embedded shape/text). The following codes are bit values: 1 = If set, code 50 specifies an absolute rotation; if not set, code 50 specifies a relative rotation 2 = Embedded element is a text string 4 = Embedded element is a shape

3 72 73 40 49 74

LTYPE

45

LTYPE group codes (continued)


Group codes 75 Description Shape number (one per element) if code 74 specifies an embedded shape. If code 74 specifies an embedded text string, this value is set to 0 If code 74 is set to 0, code 75 is omitted Pointer to STYLE object (one per element if code 74 > 0) S = Scale value (optional); multiple entries can exist R = (relative) or A = (absolute) rotation value in radians of embedded shape or text; one per element if code 74 specifies an embedded shape or text string X = X offset value (optional); multiple entries can exist Y = Y offset value (optional); multiple entries can exist Text string (one per element if code 74 = 2)

340 46 50

44 45 9

The group codes 74, 75, 340, 46, 50, 44, 45, and 9 are not returned by the tblsearch or tblnext functions. You must use tblobjname to retrieve these values within an application.

STYLE
The following group codes apply to STYLE symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. STYLE group codes
Group codes 100 2 Description Subclass marker (AcDbTextStyleTableRecord) Style name

46

Chapter 4

TABLES Section

STYLE group codes (continued)


Group codes 70 Description Standard flag values (bit-coded values): 1 = If set, this entry describes a shape 4 = Vertical text 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) Fixed text height; 0 if not fixed Width factor Oblique angle Text generation flags: 2 = Text is backward (mirrored in X) 4 = Text is upside down (mirrored in Y) Last height used Primary font file name Bigfont file name; blank if none

40 41 50 71

42 3 4

A STYLE table item is also used to record shape file LOAD command requests. In this case the first bit (1) is set in the 70 group flags and only the 3 group (shape file name) is meaningful (all the other groups are output, however).

UCS
The following group codes apply to UCS symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

UCS

47

UCS group codes


Group codes 100 2 70 Description Subclass marker (AcDbUCSTableRecord) UCS name Standard flag values (bit-coded values): 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) Origin (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of origin (in WCS) X-axis direction (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of X-axis direction (in WCS) Y-axis direction (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of Y-axis direction (in WCS) Always 0 Elevation ID/handle of base UCS if this is an orthographic. This code is not present if the 79 code is 0. If this code is not present and 79 code is non-zero, then base UCS is assumed to be WORLD Orthographic type (optional; always appears in pairs with the 13, 23, 33 codes): 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right Origin for this orthographic type relative to this UCS. DXF: X value of origin point; APP: 3D point DXF: Y and Z values of origin point

10

20, 30 11

21, 31 12

22, 32 79 146 346

71

13

23, 33

48

Chapter 4

TABLES Section

Each 71/13,23,33 pair defines the UCS origin for a particular orthographic type relative to this UCS. For instance if the following pair is present, then invoking the UCS/LEFT command when UCSBASE is set to this UCS will cause the new UCS origin to become (1,2,3).
71: 13: 23: 33: 5 1.0 2.0 3.0

If this pair were not present, then invoking the UCS/LEFT command would cause the new UCS origin to be set to this UCSs origin point.

VIEW
The following group codes apply to VIEW symbol table entries. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. VIEW group codes
Group codes 100 2 70 Description Subclass marker (AcDbViewTableRecord) Name of view Standard flag values (bit-coded values): 1 = If set, this is a paper space view 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) View height (in DCS) View center point (in DCS) DXF: X value; APP: 2D point DXF: Y value of view center point (in DCS)

40 10

20

VIEW

49

VIEW group codes (continued)


Group codes 41 11 Description View width (in DCS) View direction from target (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of view direction from target (in WCS) Target point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of target point (in WCS) Lens length Front clipping plane (offset from target point) Back clipping plane (offset from target point) Twist angle View mode (see VIEWMODE system variable) Render mode: 0 = 2D Optimized (classic 2D) 1 = Wireframe 2 = Hidden line 3 = Flat shaded 4 = Gouraud shaded 5 = Flat shaded with wireframe 6 = Gouraud shaded with wireframe All rendering modes other than 2D Optimized engage the new 3D graphics pipeline. These values directly correspond to the SHADEMODE command and the AcDbAbstractViewTableRecord::RenderMode enum 72 1 if there is a UCS associated to this view, 0 otherwise

21, 31 12

22, 32 42 43 44 50 71 281

The following codes only appear if code 72 is set to 1. They define the UCS that is associated to this view. This UCS will become the current UCS whenever this view is restored (if code 72 is 0, the UCS is unchanged).

50

Chapter 4

TABLES Section

VIEW with UCS group codes


Group codes 110 Description UCS origin (appears only if code 72 is set to 1) DXF: X value; APP: 3D point DXF: Y and Z values of UCS origin UCS X-axis (appears only if code 72 is set to 1) DXF: X value; APP: 3D vector DXF: Y and Z values of UCS X-axis UCS Y-axis (appears only if code 72 is set to 1) DXF: X value; APP: 3D vector DXF: Y and Z values of UCS Y-axis Orthographic type of UCS (appears only if code 72 is set to 1): 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right UCS Elevation (appears only if code 72 is set to 1) ID/handle of AcDbUCSTableRecord if UCS is a named UCS. If not present, then UCS is unnamed (appears only if code 72 is set to 1) ID/handle of AcDbUCSTableRecord of base UCS if UCS is orthographic (79 code is non-zero). If not present and 79 code is non-zero, then base UCS is taken to be WORLD (appears only if code 72 is set to 1)

120, 130 111

121, 131 112

122, 132 79

146 345

346

VPORT
The following group codes apply to VPORT symbol table entries. The VPORT table is unique: it may contain several entries with the same name (indicating a multiple-viewport configuration). The entries corresponding to the active viewport configuration all have the name *ACTIVE. The first such entry describes the current viewport. In addition to the group codes described here, see Common Group Codes for Symbol Table Entries on

VPORT

51

page 37. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. VPORT group codes
Group codes 100 2 70 Description Subclass marker (AcDbViewportTableRecord) Viewport name Standard flag values (bit-coded values): 16 = If set, table entry is externally dependent on an xref 32 = If this bit and bit 16 are both set, the externally dependent xref has been successfully resolved 64 = If set, the table entry was referenced by at least one entity in the drawing the last time the drawing was edited. (This flag is for the benefit of AutoCAD commands. It can be ignored by most programs that read DXF files and need not be set by programs that write DXF files) Lower-left corner of viewport DXF: X value; APP: 2D point DXF: Y value of lower-left corner of viewport Upper-right corner of viewport DXF: X value; APP: 2D point DXF: Y value of upper-right corner of viewport View center point (in DCS) DXF: X value; APP: 2D point DXF: Y value of view center point (in DCS) Snap base point DXF: X value; APP: 2D point DXF: Y value of snap base point Snap spacing X and Y DXF: X value; APP: 2D point DXF: Y value of snap spacing X and Y Grid spacing X and Y DXF: X value; APP: 2D point DXF: Y value of grid spacing X and Y

10

20 11

21 12

22 13

23 14

24 15

25

52

Chapter 4

TABLES Section

VPORT group codes (continued)


Group codes 16 Description View direction from target point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of view direction from target point (in WCS) View target point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of view target point (in WCS) View height Viewport aspect ratio Lens length Front clipping plane (offset from target point) Back clipping plane (offset from target point) Snap rotation angle View twist angle APP: Status field (never saved in DXF) APP: ID (never saved in DXF) View mode (see VIEWMODE system variable) Circle zoom percent Fast zoom setting UCSICON setting Snap on/off Grid on/off Snap style Snap isopair

26, 36

17

27, 37 40 41 42 43 44 50 51 68 69 71 72 73 74 75 76 77 78

VPORT

53

VPORT group codes (continued)


Group codes 281 Description Render mode: 0 = 2D Optimized (classic 2D) 1 = Wireframe 2 = Hidden line 3 = Flat shaded 4 = Gouraud shaded 5 = Flat shaded with wireframe 6 = Gouraud shaded with wireframe All rendering modes other than 2D Optimized engage the new 3D graphics pipeline. These values directly correspond to the SHADEMODE command and the AcDbAbstractViewTableRecord::RenderMode enum 65 Value of UCSVP for this viewport. If set to 1, then viewport stores its own UCS which will become the current UCS whenever the viewport is activated. If set to 0, UCS will not change when this viewport is activated UCS origin DXF: X value; APP: 3D point DXF: Y and Z values of UCS origin UCS X-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS X-axis UCS Y-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS Y-axis Orthographic type of UCS 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right Elevation ID/handle of AcDbUCSTableRecord if UCS is a named UCS. If not present, then UCS is unnamed ID/handle of AcDbUCSTableRecord of base UCS if UCS is orthographic (79 code is non-zero). If not present and 79 code is non-zero, then base UCS is taken to be WORLD

110

120, 130 111

121, 131 112

122, 132 79

146 345

346

54

Chapter 4

TABLES Section

BLOCKS Section

5
In this chapter
s BLOCKS Section Group Codes s BLOCK s ENDBLK

The group codes described in this chapter are found in DXF files and used by applications. The BLOCKS section contains an entry for each block reference in the drawing.

55

BLOCKS Section Group Codes


The BLOCKS section of the DXF file contains all the block definitions, including anonymous blocks generated by the HATCH command and by associative dimensioning. Each block definition contains the entities that make up that block as it is used in the drawing. The format of the entities in this section is identical to those in the ENTITIES section. All entities in the BLOCKS section appear between block and endblk entities. Block and endblk entities appear only in the BLOCKS section. Block definitions are never nested (that is, no block or endblk entity ever appears within another blockendblk pair), although a block definition can contain an insert entity. External references are written in the DXF file as block definitions, except that they also include a string (group code 1) that specifies the path and file name of the external reference. The block table handle, along with any xdata and persistent reactors, appears in each block definition immediately following the BLOCK record, which contains all of the specific information that a block table record stores.

BLOCK
The following group codes apply to block entities. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Block group codes
Group codes 0 5 102 Description Entity type (BLOCK) Handle Start of application-defined group {application_name. For example, {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group (optional) Codes and values within the 102 groups are application defined (optional) End of group, } (optional) Soft-pointer ID/handle to owner object

applicationdefined codes 102 330

56

Chapter 5

BLOCKS Section

Block group codes (continued)


Group codes 100 8 100 2 70 Description Subclass marker (AcDbEntity) Layer name Subclass marker (AcDbBlockBegin) Block name Block-type flags (bit coded values, may be combined): 0 = Indicates none of the following flags apply 1 = This is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application 2 = This block has non-constant attribute definitions (this bit is not set if the block has any attribute definitions that are constant, or has no attribute definitions at all) 4 = This block is an external reference (xref) 8 = This block is an xref overlay 16 = This block is externally dependent 32 = This is a resolved external reference, or dependent of an external reference (ignored on input) 64 = This definition is a referenced external reference (ignored on input) Base point DXF: X value; APP: 3D point DXF: Y and Z values of base point Block name Xref path name Block description (optional)

10

20, 30 3 1 4

The UCS in effect when a block definition is created becomes the WCS for all entities in the block definition. The new origin for these entities is shifted to match the base point defined for the block definition. All entity data is translated to fit this new WCS. Model Space and Paper Space Block Definitions Three empty definitions always appear in the BLOCKS section. They are titled *Model_Space, *Paper_Space and *Paper_Space0. These definitions manifest the representations of model space and paper space as block definitions internally. The internal name of the first paper space layout is

BLOCK

57

*Paper_Space, the second is *Paper_Space0, the third *Paper_Space1, and so on. Model Space and Paper Space Entity Segregation The interleaving between model space and paper space no longer occurs. Instead, all paper space entities are output, followed by model space entities. The flag distinguishing them is the group code 67.

ENDBLK
The following group codes apply to endblk objects. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Endblk group codes
Group codes 0 5 102 Description Entity type (ENDBLK) Handle Start of application-defined group {application_name. For example, {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group (optional) Codes and values within the 102 groups are application defined (optional) End of group, } (optional) Soft-pointer ID/handle to owner object Subclass marker (AcDbEntity) Layer name Subclass marker (AcDbBlockEnd)

applicationdefined codes 102 330 100 8 100

58

Chapter 5

BLOCKS Section

ENTITIES Section

6
In this chapter
s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s s
Common Group Codes for Entities 3DFACE 3DSOLID ACAD_PROXY_ENTITY ARC ATTDEF ATTRIB BODY CIRCLE DIMENSION ELLIPSE HATCH IMAGE INSERT LEADER LINE LWPOLYLINE MLINE MTEXT OLEFRAME OLE2FRAME POINT POLYLINE RAY REGION SEQEND SHAPE SOLID SPLINE TEXT TOLERANCE TRACE VERTEX VIEWPORT XLINE

This chapter presents the group codes that apply to graphical objects. These codes are found in the ENTITIES section of a DXF file and are used by AutoLISP and ObjectARX applications in entity definition lists.

59

Common Group Codes for Entities


The following table shows group codes that apply to virtually all graphical objects. Some of the group codes shown here are included with an entity definition only if the entity has nondefault values for the property. When you refer to the group codes by entity type, the lists of codes associated with specific entities, keep in mind that the codes shown here are also present.

NOTE Do not write programs that rely on the order shown in these DXF code
tables. Although these tables show the order of group codes as they usually appear, the order can change under certain conditions or may be changed in a future AutoCAD release. The code that controls an entity should be driven by a case (switch) or a table so that it can process each group correctly even if the order is unexpected. When a group is omitted, its default value upon input (when using OPEN) is indicated in the third column. If the value of a group code is equal to the default, it is omitted upon output (when using SAVEAS). For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Group codes that apply to all graphical objects
Group code 1 Description APP: entity name (changes each time a drawing is opened) Entity type Handle Start of application defined group {application_name (optional) Codes and values within the 102 groups are application-defined (optional) End of group, } (optional) {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group. This group exists only if persistent reactors have been attached to this object (optional) If omitted, defaults to not omitted

0 5 102

not omitted not omitted no default

applicationdefined codes 102 102

no default

no default no default

60

Chapter 6

ENTITIES Section

Group codes that apply to all graphical objects (continued)


Group code 330 Description Soft pointer ID/handle to owner dictionary (optional) End of group, } (optional) {ACAD_XDICTIONARY indicates the start of an extension dictionary group. This group exists only if persistent reactors have been attached to this object (optional) Hard owner ID/handle to owner dictionary (optional) End of group, } (optional) Soft-pointer ID/handle to owner BLOCK_RECORD object Subclass marker (AcDbEntity) Absent or zero indicates entity is in model space. 1 indicates entity is in paper space (optional) APP: layout tab name Layer name Linetype name (present if not BYLAYER). The special name BYBLOCK indicates a floating linetype (optional) Color number (present if not BYLAYER); zero indicates the BYBLOCK (floating) color; 256 indicates BYLAYER; a negative value indicates that the layer is turned off (optional) Lineweight enum value. Stored and moved around as a 16-bit integer. Linetype scale (optional) Object visibility (optional): 0 = Visible, 1 = Invisible The number of bytes in the image (and subsequent binary chunk records) (optional) If omitted, defaults to no default

102 102

no default no default

360

no default

102 330

no default not omitted

100 67

not omitted 0

410 8 6

not omitted not omitted BYLAYER

62

BYLAYER

370

not omitted

48 60

1.0 0

92

no default

Common Group Codes for Entities

61

Group codes that apply to all graphical objects (continued)


Group code 310 Description Preview image data (multiple lines; 256 charaters max. per line) (optional) If omitted, defaults to no default

3DFACE
The following group codes apply to 3dface entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. 3dface group codes
Group codes 100 10 Description Subclass marker (AcDbFace) First corner (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of first corner (in WCS) Second corner (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of second corner (in WCS) Third corner (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of third corner (in WCS) Fourth corner (in WCS). If only three corners are entered, this is the same as the third corner DXF: X value; APP: 3D point DXF: Y and Z values of fourth corner (in WCS) Invisible edge flags (optional; default = 0): 1 = First edge is invisible 2 = Second edge is invisible 4 = Third edge is invisible 8 = Fourth edge is invisible

20, 30 11

21, 31 12

22, 32 13

23, 33 70

62

Chapter 6

ENTITIES Section

3DSOLID
The following group codes apply to 3dsolid entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. 3dsolid group codes
Group codes 100 70 1 3 Description Subclass marker (AcDbModelerGeometry) Modeler format version number (currently = 1) Proprietary data (multiple lines < 255 characters each) Additional lines of proprietary data (if previous group 1 string is greater than 255 characters) (optional)

ACAD_PROXY_ENTITY
The following group codes apply to proxy entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Acad_proxy_entity group codes
Group codes 100 90 91 Description DXF: AcDbProxyEntity DXF: Proxy entity class ID (always 498) DXF: Application entitys class ID. Class IDs are based on the order of the class in the CLASSES section. The first class is given the ID of 500, the next is 501, and so on DXF: Size of graphics data in bytes DXF: Binary graphics data (multiple entries can appear) (optional)

92 310

3DSOLID

63

Acad_proxy_entity group codes (continued)


Group codes 93 310 330 or 340 or 350 or 360 94 95 Description DXF: Size of entity data in bits DXF: Binary entity data (multiple entries can appear) (optional) DXF: An object ID (multiple entries can appear) (optional)

DXF: 0 (indicates end of object ID section) DXF: Object drawing format when it becomes a proxy (a 32-bit unsigned integer): Low word is AcDbDwgVersion High word is MaintenanceReleaseVersion DXF: Original custom object data format: 0 = DWG format 1 = DXF format

70

ARC
The following group codes apply to arc entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Arc group codes
Group codes 100 39 10 Description Subclass marker (AcDbCircle) Thickness (optional; default = 0) Center point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of center point (in OCS) Radius Subclass marker (AcDbArc) Start angle

20, 30 40 100 50

64

Chapter 6

ENTITIES Section

Arc group codes (continued)


Group codes 51 210 Description End angle Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

220, 230

ATTDEF
The following group codes apply to attdef (attribute definition) entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Attdef group codes
Group codes 100 39 10 Description Subclass marker (AcDbText) Thickness (optional; default = 0) First alignment point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of text start point (in OCS) Text height Default value (string) Subclass marker (AcDbAttributeDefinition) Text rotation (optional; default = 0) Relative X scale factor (width) (optional; default = 1). This value is also adjusted when fit-type text is used Oblique angle (optional; default = 0) Text style name (optional, default = STANDARD)

20, 30 40 1 100 50 41

51 7

ATTDEF

65

Attdef group codes (continued)


Group codes 71 72 Description Text generation flags (optional, default = 0); see TEXT group codes Horizontal text justification type (optional, default = 0); see TEXT group codes Second alignment point (in OCS) (optional) DXF: X value; APP: 3D point Meaningful only if 72 or 74 group values are nonzero DXF: Y and Z values of second alignment point (in OCS) (optional) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction Subclass marker (AcDbAttributeDefinition) Prompt string Tag string Attribute flags: 1 = Attribute is invisible (does not appear) 2 = This is a constant attribute 4 = Verification is required on input of this attribute 8 = Attribute is preset (no prompt during insertion) Field length (optional; default = 0) (not currently used) Vertical text justification type (optional, default = 0); see group code 73 in TEXT

11

21, 31 210

220, 230 100 3 2 70

73 74

If group 72 and/or 74 values are nonzero then the first alignment point values are ignored and AutoCAD calculates new values based on the second alignment point and the length and height of the text string itself (after applying the text style). If the 72 and 74 values are zero or missing, then the second alignment point is meaningless.

ATTRIB
The following group codes apply to attrib (attribute) entities. In addition to the group codes described here, see Common Group Codes for Entities on

66

Chapter 6

ENTITIES Section

page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Attrib group codes
Group codes 100 39 10 Description Subclass marker (AcDbText) Thickness (optional; default = 0) Text start point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of text start point (in OCS) Text height Default value (string) Subclass marker (AcDbAttribute) Attribute tag (string) Attribute flags: 1 = Attribute is invisible (does not appear) 2 = This is a constant attribute 4 = Verification is required on input of this attribute 8 = Attribute is preset (no prompt during insertion) Field length (optional; default = 0) (not currently used) Text rotation (optional; default = 0) Relative X scale factor (width) (optional; default = 1). This value is also adjusted when fit-type text is used Oblique angle (optional; default = 0) Text style name (optional, default = STANDARD) Text generation flags (optional, default = 0). See TEXT group codes Horizontal text justification type (optional, default = 0). See TEXT group codes Vertical text justification type (optional, default = 0). See group code 73 in TEXT Alignment point (in OCS) (optional) DXF: X value; APP: 3D point Present only if 72 or 74 group is present and nonzero

20, 30 40 1 100 2 70

73 50 41

51 7 71 72

74

11

ATTRIB

67

Attrib group codes (continued)


Group codes 21, 31 210 Description DXF: Y and Z values of alignment point (in OCS) (optional) Extrusion direction. Present only if the entitys extrusion direction is not parallel to the WCS Z axis (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

220, 230

If group 72 and/or 74 values are nonzero then the text insertion point values are ignored, and AutoCAD calculates new values based on the text alignment point and the length of the text string itself (after applying the text style). If the 72 and 74 values are zero or missing, then the text alignment point is ignored and recalculated based on the text insertion point and the length of the text string itself (after applying the text style).

BODY
The following group codes apply to body entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Body group codes
Group codes 100 70 1 3 Description Subclass marker (AcDbModelerGeometry) Modeler format version number (currently = 1) Proprietary data (multiple lines < 255 characters each) Additional lines of proprietary data (if previous group 1 string is greater than 255 characters) (optional)

68

Chapter 6

ENTITIES Section

CIRCLE
The following group codes apply to circle entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Circle group codes
Group codes 100 39 10 Description Subclass marker (AcDbCircle) Thickness (optional; default = 0) Center point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of center point (in OCS) Radius Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

20, 30 40 210

220, 230

DIMENSION
Dimension entity definitions consist of group codes that are common to all dimension types, followed by codes specific to the type.

Common Dimension Group Codes


The following group codes apply to all dimension entity types. In addition to the group codes described here, see Common Group Codes for Entities

CIRCLE

69

on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Common dimension group codes
Group codes 100 2 Description Subclass marker (AcDbDimension) Name of the block that contains the entities that make up the dimension picture Definition point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point (in WCS) Middle point of dimension text (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of middle point of dimension text (in OCS) Dimension type. Values 06 are integer values that represent the dimension type. Values 32, 64, and 128 are bit values, which are added to the integer values (value 32 is always set in R13 and later releases). 0 = Rotated, horizontal, or vertical; 1 = Aligned; 2 = Angular; 3 = Diameter; 4 = Radius; 5 = Angular 3 point; 6 = Ordinate; 32 = Indicates that the block reference (group code 2) is referenced by this dimension only. 64 = Ordinate type. This is a bit value (bit 7) used only with integer value 6. If set, ordinate is X-type; if not set, ordinate is Y-type. 128 = This is a bit value (bit 8) added to the other group 70 values if the dimension text has been positioned at a user-defined location rather than at the default location Attachment point: 1 = Top left; 2 = Top center; 3 = Top right; 4 = Middle left; 5 = Middle center; 6 = Middle right; 7 = Bottom left; 8 = Bottom center; 9 = Bottom right Dimension text line spacing style (optional): 1 (or missing) = At least (taller characters will override) 2 = Exact (taller characters will not override) Dimension text line spacing factor (optional): Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00 Actual measurement (optional; read-only value)

10

20, 30 11

21, 31 70

71

72

41

42

70

Chapter 6

ENTITIES Section

Common dimension group codes (continued)


Group codes 1 Description Dimension text explicitly entered by the user. Optional; default is the measurement. If null or <>, the dimension measurement is drawn as the text, if (one blank space), the text is suppressed. Anything else is drawn as the text The optional group code 53 is the rotation angle of the dimension text away from its default orientation (the direction of the dimension line) (optional) All dimension types have an optional 51 group code, which indicates the horizontal direction for the dimension entity. The dimension entity determines the orientation of dimension text and lines for horizontal, vertical, and rotated linear dimensions. This group value is the negative of the angle between the OCS X axis and the UCS X axis. It is always in the XY plane of the OCS Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) Dimension style name

53

51

210

220, 230 3

Xdata belonging to the application ID "ACAD" follows a dimension entity if any dimension overrides that have been applied to this entity. See Dimension Style Overrides on page 76. For all dimension types, the following group codes represent 3D WCS points:
s s s s

(10, 20, 30) (13, 23, 33) (14, 24, 34) (15, 25, 35)

For all dimension types, the following group codes represent 3D OCS points:
s s s

(11, 21, 31) (12, 22, 32) (16, 26, 36)

Aligned Dimension Group Codes


The following group codes apply to aligned dimensions. In addition to the group codes described here, those listed in Common Group Codes for Enti-

DIMENSION

71

ties on page 60 and Common Dimension Group Codes on page 69 can also be present. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Aligned dimension group codes
Group codes 100 12 Description Subclass marker (AcDbAlignedDimension) Insertion point for clones of a dimensionBaseline and Continue (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of insertion point for clones of a dimension Baseline and Continue (in OCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS)

22, 32

13

23, 33

14

24, 34

The point (13,23,33) specifies the start point of the first extension line and the point (14,24,34) specifies the start point of the second extension line. Point (10,20,30) specifies the dimension line location. The point (11,21,31) specifies the midpoint of the dimension text.

Linear and Rotated Dimension Group Codes


The following group codes apply to linear and rotated dimensions (note that linear and rotated dimensions are part of the AcDbAlignedDimension subclass). In addition to the group codes described here, those listed in Common Group Codes for Entities on page 60 and Common Dimension Group Codes on page 69 can also be present. For information about abbreviations

72

Chapter 6

ENTITIES Section

and formatting used in this table, see Formatting Conventions in This Reference on page 6. Linear and rotated dimension group codes
Group codes 100 12 Description Subclass marker (AcDbAlignedDimension) Insertion point for clones of a dimensionBaseline and Continue (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of insertion point for clones of a dimension Baseline and Continue (in OCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Angle of rotated, horizontal, or vertical dimensions Linear dimension types with an oblique angle have an optional group code 52. When added to the rotation angle of the linear dimension (group code 50), it gives the angle of the extension lines Subclass marker (AcDbRotatedDimension)

22, 32

13

23, 33

14

24, 34

50 52

100

Radial and Diameter Dimension Group Codes


The following group codes apply to radial and diameter dimensions. In addition to the group codes described here, those listed in Common Group Codes for Entities on page 60 and Common Dimension Group Codes on page 69 can also be present. For information about abbreviations and format-

DIMENSION

73

ting used in this table, see Formatting Conventions in This Reference on page 6. Radial and diameter dimension group codes
Group codes 100 15 Description Subclass marker (AcDbRadialDimension or AcDbDiametricDimension) Definition point for diameter, radius, and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for diameter, radius, and angular dimensions (in WCS) Leader length for radius and diameter dimensions

25, 35

40

The point (15,25,35) specifies the first point of the dimension line on the circle/arc and the point (10,20,30) specifies the point opposite the first point. The point (11,21,31) specifies the midpoint of the dimension text. The point (15,25,35) specifies the first point of the dimension line on the circle/arc and the point (10,20,30) specifies the center of the circle/arc. The point (11,21,31) specifies the midpoint of the dimension text.

Angular Dimension Group Codes


The following group codes apply to angular dimensions. In addition to the group codes described here, those listed in Common Group Codes for Entities on page 60 and Common Dimension Group Codes on page 69 can also be present. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Angular dimension group codes
Group codes 100 13 Description Subclass marker (AcDb3PointAngularDimension) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point

23, 33

14

74

Chapter 6

ENTITIES Section

Angular dimension group codes (continued)


Group codes 24, 34 Description DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Definition point for diameter, radius, and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for diameter, radius, and angular dimensions (in WCS) Point defining dimension arc for angular dimensions (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of point defining dimension arc for angular dimensions (in OCS)

15

25, 35

16

26, 36

The points (13,23,33) and (14,24,34) specify the endpoints of the line used to determine the first extension line. Points (10,20,30) and (15,25,35) specify the endpoints of the line used to determine the second extension line. Point (16,26,36) specifies the location of the dimension line arc. The point (11,21,31) specifies the midpoint of the dimension text. The point (15,25,35) specifies the vertex of the angle. The points (13,23,33) and (14,24,34) specify the endpoints of the extension lines. The point (10,20,30) specifies the location of the dimension line arc and the point (11,21,31) specifies the midpoint of the dimension text.

Ordinate Dimension Group Codes


The following group codes apply to ordinate dimensions. In addition to the group codes described here, those listed in Common Group Codes for Entities on page 60 and Common Dimension Group Codes on page 69 can also be present. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Ordinate dimension group codes
Group codes 100 13 Description Subclass marker (AcDbOrdinateDimension) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point

DIMENSION

75

Ordinate dimension group codes (continued)


Group codes 23, 33 Description DXF: Y and Z values of definition point for linear and angular dimensions (in WCS) Definition point for linear and angular dimensions (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of definition point for linear and angular dimensions (in WCS)

14

24, 34

The point (13,23,33) specifies the feature location and the point (14,24,34) specifies the leader end point. The point (11,21,31) specifies the midpoint of the dimension text. Point (10,20,30) is placed at the origin of the UCS that is current when the dimension is created.

Dimension Style Overrides


Dimension style overrides can be applied to dimension, leader, and tolerance entities. Any overrides applied to these entities are stored in the entity as xdata. The overridden dimension variable group codes and the related values are contained within group 1002 control strings. The following example shows the xdata of a dimension entity where the DIMTOL and DIMCLRE variables have been overridden.
(setq diment (car (entsel))) ; Select dimension entity (setq elst (entget diment '("ACAD"))) ; Get entity definition list (assoc -3 elst) ; Extract xdata only

This code returns the following:


(-3 ("ACAD" Start of the ACAD APPID section of xdata (1000 . "DSTYLE") (1002 . "{") Beginning of the dimstyle subsection (1070 . 177) (1070 . 3) The DIMCLRE (code 177) override + value (3) (1070 . 71) (1070 . 1) The DIMTOL (code 71) override + value (1) (1002 . "}") )) End dimstyle subsection and ACAD section

ELLIPSE
The following group codes apply to ellipse entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60.

76

Chapter 6

ENTITIES Section

For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Ellipse group codes
Group codes 100 10 Description Subclass marker (AcDbEllipse) Center point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of center point (in WCS) Endpoint of major axis, relative to the center (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of endpoint of major axis, relative to the center (in WCS) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) Ratio of minor axis to major axis Start parameter (this value is 0.0 for a full ellipse) End parameter (this value is 2pi for a full ellipse)

20, 30 11

21, 31

210

220, 230 40 41 42

The group codes 41 and 42 are the start and end values for u in the equation describing the Parameter option of the ELLIPSE command (see the following topic, ELLIPSE Commands Parameter Option). The magnitude of the codes 11,21,31 vector is equal to 1/2 of the major axis which is the a value in the equation. The point 10,20,30 is the c value in the equation. Knowing all these, we can calculate the b value to complete the equation.

ELLIPSE Commands Parameter Option


The Parameter option of the ELLIPSE command uses the following equation to define an elliptical arc.
p(u)=c+a*cos(u)+b*sin(u)

The variables a, b, c are determined when you select the endpoints for the first axis and the distance for the second axis. a is the negative of 1/2 of the

ELLIPSE

77

major axis length, b is the negative of 1/2 the minor axis length, and c is the center point (2-D) of the ellipse. Because this is actually a vector equation and the variable c is actually a point with X and Y values, it really should be written as:
p(u)=(Cx+a*cos(u))*i+(Cy+b*sin(u))*j

where
s s s s s

Cx is the X value of the point c Cy is the Y value of the point c a is (1/2 of the major axis length) b is (1/2 of the minor axis length) i and j represent unit vectors in the X and Y directions

In AutoCAD, once the axis endpoints are selected, all you have left to specify is the start and end of the elliptical arc. When you select the parameter option, you are asked for a start parameter and an end parameter. These values are plugged into the equation to determine the actual start and end points on the ellipse. The rest of the ellipse is filled in between these two points in a counterclockwise direction from the first parameter to the second. The value entered for the parameter u is taken to be degrees for the purposes of obtaining the cos(u) and sin(u). For example: Axis endpoint 1 = 0,1 Axis endpoint 2 = 4,1 Other axis distance = 2,0 Start parameter = 270 End parameter = 0 generates the start point at 2,2 and the end point at 0,1 and fills in the ellipse from 2,2 to 0,1 in a counterclockwise direction.

HATCH
The following group codes apply to hatch entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60.

78

Chapter 6

ENTITIES Section

For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Hatch group codes
Group codes 100 10 Description Subclass marker (AcDbHatch) Elevation point (in OCS) DXF: X value = 0; APP: 3D point (X and Y always equal 0, Z represents the elevation) DXF: Y and Z values of elevation point (in OCS) Y value = 0, Z represents the elevation Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction Hatch pattern name Solid fill flag (solid fill = 1; pattern fill = 0) Associativity flag (associative = 1; non-associative = 0) Number of boundary paths (loops) Boundary path data. Repeats number of times specified by code 91. See Boundary Path Data on page 80 Hatch style: 0 = Hatch odd parity area (Normal style) 1 = Hatch outermost area only (Outer style) 2 = Hatch through entire area (Ignore style) Hatch pattern type: 0 = User-defined; 1 = Predefined; 2 = Custom Hatch pattern angle (pattern fill only) Hatch pattern scale or spacing (pattern fill only) Hatch pattern double flag (pattern fill only): 0 = not double; 1 = double Number of pattern definition lines

20, 30

210

220, 230 2 70 71 91 varies

75

76

52 41 77

78

HATCH

79

Hatch group codes (continued)


Group codes varies Description Pattern line data. Repeats number of times specified by code 78. See Pattern Data on page 83 Pixel size used to determine the density to perform various intersection and ray casting operations in hatch pattern computation for associative hatches and hatches created with the Flood method of hatching Number of seed points Seed point (in OCS) DXF: X value; APP: 2D point (multiple entries) DXF: Y value of seed point (in OCS); (multiple entries)

47

98 10

20

Boundary Path Data


The boundary of each hatch object is defined by a path (or loop) that consists of one or more segments. Path segment data varies depending on the entity type (or types) that make up the path. Each path segment is defined by its own set of group codes. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Hatch boundary path data group codes
Group codes 92 Description Boundary path type flag (bit coded): 0 = Default; 1 = External; 2 = Polyline; 4 = Derived; 8 = Textbox; 16 = Outermost Polyline boundary type data (only if boundary = polyline). See Polyline boundary data table below Number of edges in this boundary path (only if boundary is not a polyline) Edge type (only if boundary is not a polyline): 1 = Line; 2 = Circular arc; 3 = Elliptic arc; 4 = Spline Edge type data (only if boundary is not a polyline). See appropriate Edge data table below Number of source boundary objects

varies

93

72

varies

97

80

Chapter 6

ENTITIES Section

Hatch boundary path data group codes (continued)


Group codes 330 Description Reference to source boundary objects (multiple entries)

Polyline boundary data group codes


Group codes 72 73 93 10 Description Has bulge flag Is closed flag Number of polyline vertices Vertex location (in OCS) DXF: X value; APP: 2D point (multiple entries) DXF: Y value of vertex location (in OCS) (multiple entries) Bulge (optional, default = 0)

20 42

Line edge data group codes


Group codes 10 Description Start point (in OCS) DXF: X value; APP: 2D point DXF: Y value of start point (in OCS) End point (in OCS) DXF: X value; APP: 2D point DXF: Y value of end point (in OCS)

20 11

21

Arc edge data group codes


Group codes 10 Description Center point (in OCS) DXF: X value; APP: 2D point DXF: Y value of center point (in OCS) Radius

20 40

HATCH

81

Arc edge data group codes (continued)


Group codes 50 51 73 Description Start angle End angle Is counterclockwise flag

Ellipse edge data group codes


Group codes 10 Description Center point (in OCS) DXF: X value; APP: 2D point DXF: Y value of center point (in OCS) End point of major axis relative to center point (in OCS) DXF: X value; APP: 2D point DXF: Y value of end point of major axis (in OCS) Length of minor axis (percentage of major axis length) Start angle End angle Is counterclockwise flag

20 11

21 40 50 51 73

Spline edge data group codes


Group codes 94 73 74 95 96 40 Description Degree Rational Periodic Number of knots Number of control points Knot values (multiple entries)

82

Chapter 6

ENTITIES Section

Spline edge data group codes (continued)


Group codes 10 Description Control point (in OCS) DXF: X value; APP: 2D point DXF: Y value of control point (in OCS) Weights (optional, default = 1)

20 42

Pattern Data
The following pattern data codes repeat for each pattern definition line. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Hatch pattern data group codes
Group codes 53 43 44 45 46 79 49 Description Pattern line angle Pattern line base point, X component Pattern line base point, Y component Pattern line offset, X component Pattern line offset, Y component Number of dash length items Dash length (multiple entries)

IMAGE
The following group codes apply to image entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60.

IMAGE

83

For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Image group codes
Group codes 100 90 10 Description Subclass marker (AcDbRasterImage) Class version Insertion point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of insertion point (in WCS) U-vector of a single pixel (points along the visual bottom of the image, starting at the insertion point) (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values U-vector (in WCS) V-vector of a single pixel (points along the visual left side of the image, starting at the insertion point) (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of V-vector (in WCS) Image size in pixels DXF: U value; APP: 2D point (U and V values) DXF: V value of image size in pixels Hard reference to imagedef object Image display properties: 1 = Show image 2 = Show image when not aligned with screen 4 = Use clipping boundary 8 = Transparency is on Clipping state: 0 = Off, 1 = On Brightness value (0-100; default = 50) Contrast value (0-100; default = 50) Fade value (0-100; default = 0)

20, 30 11

21, 31 12

22, 32 13

23 340 70

280 281 282 283

84

Chapter 6

ENTITIES Section

Image group codes (continued)


Group codes 360 71 91 14 Description Hard reference to imagedef_reactor object Clipping boundary type. 1 = Rectangular, 2 = Polygonal Number of clip boundary vertices that follow Clip boundary vertex (in OCS) DXF: X value; APP: 2D point (multiple entries) Notes: 1) For rectangular clip boundary type, two opposite corners must be specified. Default is (0.5,0.5), (size.x0.5, size.y0.5). 2) For polygonal clip boundary type, three or more vertices must be specified. Polygonal vertices must be listed sequentially DXF: Y value of clip boundary vertex (in OCS) (multiple entries)

24

INSERT
The following group codes apply to insert (block reference) entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Insert group codes
Group codes 100 66 Description Subclass marker (AcDbBlockReference) Variable attributes-follow flag (optional; default = 0); if the value of attributes-follow flag is 1, a series of attribute entities is expected to follow the insert, terminated by a seqend entity Block name Insertion point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of insertion point (in OCS) X scale factor (optional; default = 1)

2 10

20, 30 41

INSERT

85

Insert group codes (continued)


Group codes 42 43 50 70 71 44 45 210 Description Y scale factor (optional; default = 1) Z scale factor (optional; default = 1) Rotation angle (optional; default = 0) Column count (optional; default = 1) Row count (optional; default = 1) Column spacing (optional; default = 0) Row spacing (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

220, 230

LEADER
The following group codes apply to leader entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Leader group codes
Group codes 100 3 71 72 73 Description Subclass marker (AcDbLeader) Dimension style name Arrowhead flag: 0 = Disabled; 1 = Enabled Leader path type: 0 = Straight line segments; 1 = Spline Leader creation flag (default = 3): 0 = Leader created with text annotation 1 = Created with tolerance annotation 2 = Created with block reference annotation 3 = Created without any annotation

86

Chapter 6

ENTITIES Section

Leader group codes (continued)


Group codes 74 Description Hook line direction flag: 0 = Hook line (or end of tangent for a splined leader) is the opposite direction from the horizontal vector 1 = Hook line (or end of tangent for a splined leader) is the same direction as horizontal vector (see code 75) Hook line flag: 0 = No hookline; 1 = Has a hookline Text annotation height Text annotation width Number of vertices in leader (ignored for OPEN) Vertex coordinates (one entry for each vertex) DXF: X value; APP: 3D point DXF: Y and Z values of vertex coordinates Color to use if leaders DIMCLRD = BYBLOCK Hard reference to associated annotation (mtext, tolerance, or insert entity) Normal vector DXF: X value; APP: 3D vector DXF: Y and Z values of normal vector Horizontal direction for leader DXF: X value; APP: 3D vector DXF: Y and Z values of horizontal direction for leader Offset of last leader vertex from block reference insertion point DXF: X value; APP: 3D vector DXF: Y and Z values of offset Offset of last leader vertex from annotation placement point DXF: X value; APP: 3D vector DXF: Y and Z values of offset

75 40 41 76 10

20, 30 77 340

210

220, 230 211

221, 231 212

222, 232 213

223, 233

Xdata belonging to the application ID "ACAD" follows a leader entity if any dimension overrides have been applied to this entity. See Dimension Style Overrides on page 76.

LEADER

87

LINE
The following group codes apply to line entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Line group codes
Group codes 100 39 10 Description Subclass marker (AcDbLine) Thickness (optional; default = 0) Start point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of start point (in WCS) End point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of end point (in WCS) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

20, 30 11

21, 31 210

220, 230

LWPOLYLINE
The following group codes apply to lwpolyline entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

88

Chapter 6

ENTITIES Section

Lwpolyline group codes


Group codes 100 90 70 Description Subclass marker (AcDbPolyline) Number of vertices Polyline flag (bit-coded); default is 0: 1 = Closed; 128 = Plinegen Constant width (optional; default = 0). Not used if variable width (codes 40 and/or 41) is set Elevation (optional; default = 0) Thickness (optional; default = 0) Vertex coordinates (in OCS), multiple entries; one entry for each vertex DXF: X value; APP: 2D point DXF: Y value of vertex coordinates (in OCS), multiple entries; one entry for each vertex Starting width (multiple entries; one entry for each vertex) (optional; default = 0; multiple entries). Not used if constant width (code 43) is set End width (multiple entries; one entry for each vertex) (optional; default = 0; multiple entries). Not used if constant width (code 43) is set Bulge (multiple entries; one entry for each vertex) (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

43

38 39 10

20

40

41

42

210

220, 230

MLINE
The following group codes apply to mline entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

MLINE

89

Mline group codes


Group codes 100 2 Description Subclass marker (AcDbMline) String of up to 32 characters. The name of the style used for this mline. An entry for this style must exist in the MLINESTYLE dictionary. NOTE Do not modify this field without also updating the associated entry in the MLINESTYLE dictionary Pointer-handle/ID of MLINESTYLE object Scale factor Justification: 0 = Top, 1 = Zero, 2 = Bottom Flags (bit-coded values): 1 = Has at least one vertex (code 72 is greater than 0); 2 = Closed; 4 = Suppress start caps; 8 = Suppress end caps Number of vertices Number of elements in MLINESTYLE definition Start point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of start point (in WCS) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) Vertex coordinates (multiple entries; one entry for each vertex) DXF: X value; APP: 3D point DXF: Y and Z values of vertex coordinates Direction vector of segment starting at this vertex (multiple entries; one for each vertex) DXF: X value; APP: 3D vector DXF: Y and Z values of direction vector of segment starting at this vertex Direction vector of miter at this vertex (multiple entries: one for each vertex) DXF: X value; APP: 3D vector

340 40 70 71

72 73 10

20, 30 210

220, 230 11

21, 31 12

22, 32

13

90

Chapter 6

ENTITIES Section

Mline group codes (continued)


Group codes 23, 33 74 Description DXF: Y and Z values of direction vector of miter Number of parameters for this element (repeats for each element in segment) Element parameters (repeats based on previous code 74) Number of area fill parameters for this element (repeats for each element in segment) Area fill parameters (repeats based on previous code 75)

41 75

42

The group code 41 parameterization is a list of real values, one real per group code 41. The list may contain zero or more items. The first group code 41 value is the distance from the segment vertex along the miter vector to the point where the line elements path intersects the miter vector. The next group code 41 value is the distance along the line elements path from the point defined by the first group 41 to the actual start of the line element. The next is the distance from the start of the line element to the first break (or cut) in the line element. The successive group code 41 values continue to list the start and stop points of the line element in this segment of the mline. Linetypes do not affect group 41 lists. The group code 42 parameterization is also a list of real values. Similar to the 41 parameterization, it describes the parameterization of the fill area for this mline segment. The values are interpreted identically to the 41 parameters and when taken as a whole for all line elements in the mline segment, they define the boundary of the fill area for the mline segment. A common example of the use of the group code 42 mechanism is when an unfilled mline crosses over a filled mline and mledit is used to cause the filled mline to appear unfilled in the crossing area. This would result in two group 42s for each line element in the affected mline segment, one for the fill stop and one for the fill start. The 2 group codes in mline entities and mlinestyle objects are redundant fields. These groups should not be modified under any circumstances, although it is safe to read them and use their values. The correct fields to modify are as follows: Mline The 340 group in the same object, which indicates the proper MLINESTYLE object.

MLINE

91

Mlinestyle

The 3 group value in the MLINESTYLE dictionary which precedes the 350 group that has the handle or entity name of the current mlinestyle.

MTEXT
The following group codes apply to mtext entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Mtext group codes
Group codes 100 10 Description Subclass marker (AcDbMText) Insertion point DXF: X value; APP: 3D point DXF: Y and Z values of insertion point Nominal (initial) text height Reference rectangle width Attachment point: 1 = Top left; 2 = Top center; 3 = Top right; 4 = Middle left; 5 = Middle center; 6 = Middle right; 7 = Bottom left; 8 = Bottom center; 9 = Bottom right Drawing direction: 1 = Left to right; 3 = Top to bottom; 5 = By style (the flow direction is inherited from the associated text style) Text string. If the text string is less than 250 characters, all characters appear in group 1. If the text string is greater than 250 characters, the string is divided into 250 character chunks, which appear in one or more group 3 codes. If group 3 codes are used, the last group is a group 1 and has fewer than 250 characters Additional text (always in 250 character chunks) (optional) Text style name (STANDARD if not provided) (optional)

20, 30 40 41 71

72

3 7

92

Chapter 6

ENTITIES Section

Mtext group codes (continued)


Group codes 210 Description Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) X-axis direction vector (in WCS) DXF: X value; APP: 3D vector NOTE A group code 50 (rotation angle in radians) passed as DXF input is converted to the equivalent direction vector (if both a code 50 and codes 11, 21, 31 are passed, the last one wins). This is provided as a convenience for conversions from text objects DXF: Y and Z values of X-axis direction vector (in WCS) Horizontal width of the characters that make up the mtext entity. This value will always be equal to or less than the value of group code 41 (read-only, ignored if supplied) Vertical height of the mtext entity (read-only, ignored if supplied) Rotation angle in radians Mtext line spacing style (optional): 1 = At least (taller characters will override) 2 = Exact (taller characters will not override) Mtext line spacing factor (optional): Percentage of default (3-on-5) line spacing to be applied. Valid values range from 0.25 to 4.00

220, 230 11

21, 31 42

43 50 73

44

Xdata with the "DCO15" application ID may follow an mtext entity. This contains information related to the dbConnect feature.

OLEFRAME
The following group codes apply to oleframe entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

OLEFRAME

93

Oleframe group codes


Group codes 100 70 90 310 1 Description Subclass marker (AcDbOleFrame) OLE version number Length of binary data Binary data (multiple lines) End of OLE data (the string OLE)

OLE2FRAME
The following group codes apply to ole2frame entities. This information is read-only. During OPEN, the values are ignored because they are part of the OLE binary object, and are obtained via access functions. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Ole2frame group codes
Group codes 100 70 3 10 Description Subclass marker (AcDbOle2Frame) OLE version number Length of binary data Upper left corner (WCS) DXF: X value; APP: 3D point DXF: Y and Z values of upper left corner (in WCS) Lower right corner (WCS) DXF: X value; APP: 3D point DXF: Y and Z values of lower right corner (in WCS) OLE object type, 1 = Link, 2 = Embedded, 3 = Static

20, 30 11

21, 31 71

94

Chapter 6

ENTITIES Section

Ole2frame group codes (continued)


Group codes 72 Description Tile mode descriptor: 0 = Object resides in model space 1 = Object resides in paper space Length of binary data Binary data (multiple lines) End of OLE data (the string OLE)

90 310 1

Sample DXF output:


OLE2FRAME 5 2D 100 AcDbEntity 67 1 8 0 100 AcDbOle2Frame 70 2 3 Paintbrush Picture 10 4.43116 20 5.665992 30 0.0 11 6.4188 21 4.244939 31 0.0 71 2 72 1 90 23680 310 0155764BD60082B91140114B08C8F9A916400000000000000000506DC0D0D9AC 310

OLE2FRAME

95

1940114B08C8F9A916400000000000000000506DC0D0D9AC194002303E5CD1FA 310 10400000000000000000764BD60082B9114002303E5CD1FA1040000000000000 ... ...

AutoLISP entnext function sample output:


Command: (setq e (entget e3)) ((-1 . <Entity name: 7d50428>) (0 . "OLE2FRAME") (5 . "2D") (100 . "AcDbEntity") (67 . 1) (8 . "0") (100 . "AcDbOle2Frame") (70 . 2) (3 "Paintbrush Picture") (10 4.43116 5.66599 0.0) (11 6.4188 4.24494 0.0) (71 . 2) (72 . 1))

POINT
The following group codes apply to point entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Point group codes
Group codes 100 10 Description Subclass marker (AcDbPoint) Point location (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of point location (in WCS) Thickness (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) Angle of the X axis for the UCS in effect when the point was drawn (optional, default = 0); used when PDMODE is nonzero

20, 30 39 210

220, 230 50

96

Chapter 6

ENTITIES Section

POLYLINE
The following group codes apply to polyline entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Polyline group codes
Group codes 100 66 10 Description Subclass marker (AcDb2dPolyline or AcDb3dPolyline) Obsolete; formerly an entities follow flag (optional; ignore if present) DXF: always 0 APP: a dummy point; the X and Y values are always 0, and the Z value is the polylines elevation (in OCS when 2D, WCS when 3D) DXF: always 0 DXF: polylines elevation (in OCS when 2D, WCS when 3D) Thickness (optional; default = 0) Polyline flag (bit-coded); default is 0: 1 = This is a closed polyline (or a polygon mesh closed in the M direction) 2 = Curve-fit vertices have been added 4 = Spline-fit vertices have been added 8 = This is a 3D polyline 16 = This is a 3D polygon mesh 32 = The polygon mesh is closed in the N direction 64 = The polyline is a polyface mesh 128 = The linetype pattern is generated continuously around the vertices of this polyline Default start width (optional; default = 0) Default end width (optional; default = 0) Polygon mesh M vertex count (optional; default = 0) Polygon mesh N vertex count (optional; default = 0) Smooth surface M density (optional; default = 0) Smooth surface N density (optional; default = 0)

20 30 39 70

40 41 71 72 73 74

POLYLINE

97

Polyline group codes (continued)


Group codes 75 Description Curves and smooth surface type (optional; default = 0); integer codes, not bit-coded: 0 = No smooth surface fitted 5 = Quadratic B-spline surface 6 = Cubic B-spline surface 8 = Bezier surface Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

210

220, 230

Xdata with the "AUTOCAD_POSTSCRIPT_FIGURE" application ID may follow a polyline entity. This contains information related to PostScript images and PostScript fill information.

Polyface Meshes
A polyface mesh is represented in DXF as a variant of a polyline entity. The polyline header is identified as introducing a polyface mesh by the presence of the 64 bit in the polyline flags (70) group. The 71 group specifies the number of vertices in the mesh, and the 72 group specifies the number of faces. Although these counts are correct for all meshes created with the PFACE command, applications are not required to place correct values in these fields. Following the polyline header is a sequence of vertex entities that specify the vertex coordinates, then followed by faces that compose the mesh. The AutoCAD entity structure imposes a limit on the number of vertices that a given face entity can specify. You can represent more complex polygons by decomposing them into triangular wedges. Their edges should be made invisible to prevent visible artifacts of this subdivision from being drawn. The PFACE command performs this subdivision automatically, but when applications generate polyface meshes directly, the applications must do this themselves. The number of vertices per face is the key parameter in this subdivision process. The PFACEVMAX system variable provides an application with the number of vertices per face entity. This value is read-only and is set to 4. Polyface meshes created with the PFACE command are always generated with all the vertex coordinate entities first, followed by the face definition entities. The code within AutoCAD that processes polyface meshes requires this

98

Chapter 6

ENTITIES Section

ordering. Programs that generate polyface meshes in DXF should generate all the vertices then all the faces. However, programs that read polyface meshes from DXF should be tolerant of odd vertex and face ordering.

RAY
The following group codes apply to ray entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Ray group codes
Group codes 100 10 Description Subclass marker (AcDbRay) Start point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of start point (in WCS) Unit direction vector (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of unit direction vector (in WCS)

20, 30 11

21, 31

REGION
The following group codes apply to region entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Region group codes
Group codes 100 70 Description Subclass marker (AcDbModelerGeometry) Modeler format version number (currently = 1)

RAY

99

Region group codes (continued)


Group codes 1 3 Description Proprietary data (multiple lines < 255 characters each) Additional lines of proprietary data (if previous group 1 string is greater than 255 characters) (optional)

SEQEND
The following group codes apply to seqend entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Seqend group codes
Group codes 2 Description APP: name of entity that began the sequence. This entity marks the end of vertex (vertex type name) for a polyline, or the end of attribute entities (attrib type name) for an insert entity that has attributes (indicated) by 66 group present and nonzero in insert entity). This code is not saved in a DXF file

SHAPE
The following group codes apply to shape entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Shape group codes
Group codes 100 39 10 Description Subclass marker (AcDbShape) Thickness (optional; default = 0) Insertion point (in WCS) DXF: X value; APP: 3D point

100

Chapter 6

ENTITIES Section

Shape group codes (continued)


Group codes 20, 30 40 2 50 41 51 210 Description DXF: Y and Z values of insertion point (in WCS) Size Shape name Rotation angle (optional; default = 0) Relative X scale factor (optional; default = 1) Oblique angle (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

220, 230

SOLID
The following group codes apply to solid entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Solid group codes
Group codes 100 10 Description Subclass marker (AcDbTrace) First corner DXF: X value; APP: 3D point DXF: Y and Z values of first corner Second corner DXF: X value; APP: 3D point DXF: Y and Z values of second corner Third corner XF: X value; APP: 3D point

20, 30 11

21, 31 12

SOLID

101

Solid group codes (continued)


Group codes 22, 32 13 Description DXF: Y and Z values of third corner Fourth corner. If only three corners are entered to define the SOLID, then the fourth corner coordinate is the same as the third. DXF: X value; APP: 3D point DXF: Y and Z values of fourth corner Thickness (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

23, 33 39 210

220, 230

SPLINE
The following group codes apply to spline entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Spline group codes
Group codes 100 210 Description Subclass marker (AcDbSpline) Normal vector (omitted if the spline is nonplanar) DXF: X value; APP: 3D vector DXF: Y and Z values of normal vector (optional) Spline flag (bit coded): 1 = Closed spline 2 = Periodic spline 4 = Rational spline 8 = Planar 16 = Linear (planar bit is also set) Degree of the spline curve

220, 230 70

71

102

Chapter 6

ENTITIES Section

Spline group codes (continued)


Group codes 72 73 74 42 43 44 12 Description Number of knots Number of control points Number of fit points (if any) Knot tolerance (default = 0.0000001) Control-point tolerance (default = 0.0000001) Fit tolerance (default = 0.0000000001) Start tangentmay be omitted (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of start tangentmay be omitted (in WCS) End tangentmay be omitted (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of end tangentmay be omitted (in WCS) Knot value (one entry per knot) Weight (if not 1); with multiple group pairs, are present if all are not 1 Control points (in WCS), one entry per control point DXF: X value; APP: 3D point DXF: Y and Z values of control points (in WCS), one entry per control point Fit points (in WCS), one entry per fit point DXF: X value; APP: 3D point DXF: Y and Z values of fit points (in WCS), one entry per fit point

22, 32 13

23, 33 40 41 10

20, 30

11

21, 31

TEXT
The following group codes apply to text entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60.

TEXT

103

For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Text group codes
Group codes 100 39 10 Description Subclass marker (AcDbText) Thickness (optional; default = 0) First alignment point (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of first alignment point (in OCS) Text height Default value (the string itself) Text rotation (optional; default = 0) Relative X scale factorwidth (optional; default = 1) This value is also adjusted when fit-type text is used Oblique angle (optional; default = 0) Text style name (optional, default = STANDARD) Text generation flags (optional, default = 0): 2 = Text is backward (mirrored in X) 4 = Text is upside down (mirrored in Y) Horizontal text justification type (optional, default = 0) integer codes (not bit-coded) 0 = Left; 1= Center; 2 = Right 3 = Aligned (if vertical alignment = 0) 4 = Middle (if vertical alignment = 0) 5 = Fit (if vertical alignment = 0) See the Group 72 and 73 integer codes table for clarification Second alignment point (in OCS) (optional) DXF: X value; APP: 3D point This value is meaningful only if the value of a 72 or 73 group is nonzero (if the justification is anything other than baseline/left) DXF: Y and Z values of second alignment point (in OCS) (optional) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector

20, 30 40 1 50 41

51 7 71

72

11

21, 31 210

104

Chapter 6

ENTITIES Section

Text group codes (continued)


Group codes 220, 230 100 73 Description DXF: Y and Z values of extrusion direction (optional) Subclass marker (AcDbText) Vertical text justification type (optional, default = 0): integer codes (not bit-coded): 0 = Baseline; 1 = Bottom; 2 = Middle; 3 = Top See the Group 72 and 73 integer codes table for clarification

The following table describes the group codes 72 (horizontal alignment) and 73 (vertical alignment) in greater detail. Group 72 and 73 integer codes
Group 73 3 (top) 2 (middle) 1 (bottom) 0 (baseline) Group 72 0 TLeft MLeft BLeft Left 1 TCenter MCenter BCenter Center 2 TRight MRight BRight Right Aligned Middle Fit 3 4 5

If group 72 and/or 73 values are nonzero then the first alignment point values are ignored and AutoCAD calculates new values based on the second alignment point and the length and height of the text string itself (after applying the text style). If the 72 and 73 values are zero or missing, then the second alignment point is meaningless.

TOLERANCE
The following group codes apply to tolerance entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

TOLERANCE

105

Tolerance group codes


Group codes 100 3 10 Description Subclass marker (AcDbFcf) Dimension style name Insertion point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of insertion point (in WCS) String representing the visual representation of the tolerance Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional) X-axis direction vector (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of X-axis direction vector (in WCS)

20, 30 1 210

220, 230 11

21, 31

TRACE
The following group codes apply to trace entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Trace group codes
Group codes 100 10 Description Subclass marker (AcDbTrace) First corner (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of first corner (in OCS) Second corner (in OCS) DXF: X value; APP: 3D point

20, 30 11

106

Chapter 6

ENTITIES Section

Trace group codes (continued)


Group codes 21, 31 12 Description DXF: Y and Z values of second corner (in OCS) Third corner (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of third corner (in OCS) Fourth corner (in OCS) DXF: X value; APP: 3D point DXF: Y and Z values of fourth corner (in OCS) Thickness (optional; default = 0) Extrusion direction (optional; default = 0, 0, 1) DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction (optional)

22, 32 13

23, 33 39 210

220, 230

VERTEX
The following group codes apply to vertex entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Vertex group codes
Group codes 100 100 10 Description Subclass marker (AcDbVertex) Subclass marker (AcDb2dVertex or AcDb3dPolylineVertex) Location point (in OCS when 2D, and WCS when 3D) DXF: X value; APP: 3D point DXF: Y and Z values of location point (in OCS when 2D, and WCS when 3D) Starting width (optional; default is 0)

20, 30

40

VERTEX

107

Vertex group codes (continued)


Group codes 41 42 Description Ending width (optional; default is 0) Bulge (optional; default is 0). The bulge is the tangent of one fourth the included angle for an arc segment, made negative if the arc goes clockwise from the start point to the endpoint. A bulge of 0 indicates a straight segment, and a bulge of 1 is a semicircle Vertex flags: 1 = Extra vertex created by curve-fitting 2 = Curve-fit tangent defined for this vertex. A curve-fit tangent direction of 0 may be omitted from DXF output but is significant if this bit is set 4 = Not used 8 = Spline vertex created by spline-fitting 16 = Spline frame control point 32 = 3D polyline vertex 64 = 3D polygon mesh 128 = Polyface mesh vertex Curve fit tangent direction Polyface mesh vertex index. Optional. Present only if nonzero Polyface mesh vertex index. Optional. Present only if nonzero Polyface mesh vertex index. Optional. Present only if nonzero Polyface mesh vertex index. Optional. Present only if nonzero

70

50 71 72 73 74

Every vertex that is part of a polyface mesh has its vertex flag 128 bit set. If the entity supplies the coordinate of a vertex of the mesh, its 64 bit is set as well, and the 10, 20, 30 groups give the vertex coordinate. The vertex index values are determined by the order in which the vertex entities appear within the polyline, with the first being numbered 1. If the vertex defines a face of the mesh, its vertex flags group has the 128 bit set but not the 64 bit. In this case, the 10, 20, 30 (location) groups of the face entity are irrelevant and are always written as 0 in a DXF file. The vertex indexes that define the mesh are given by 71, 72, 73, and 74 group codes, the values of which specify one of the previously defined vertexes by index. If the

108

Chapter 6

ENTITIES Section

index is negative, the edge that begins with that vertex is invisible. The first 0 vertex marks the end of the vertices of the face.

VIEWPORT
The following group codes apply to viewport entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Viewport group codes
Group codes 100 10 Description Subclass marker (AcDbViewport) Center point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of center point (in WCS) Width in paper space units Height in paper space units Viewport status field: 1 = On, but is fully off screen, or is one of the viewports that is not active because the $MAXACTVP count is currently being exceeded. 0 = Off <positive value > = On and active. The value indicates the order of stacking for the viewports, where 1 is the active viewport, 2 is the next, and so forth Viewport ID View center point (in DCS) DXF: X value; APP: 2D point DXF: View center point Y value (in DCS)

20, 30 40 41 68

69 12

22

VIEWPORT

109

Viewport group codes (continued)


Group codes 13 Description Snap base point DXF: X value; APP: 2D point DXF: Snap base point Y value Snap spacing DXF: X value; APP: 2D point DXF: Snap spacing Y value Grid spacing DXF: X value; APP: 2D point DXF: Grid spacing Y value View direction vector (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of view direction vector (in WCS) View target point (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of view target point (in WCS) Perspective lens length Front clip plane Z value Back clip plane Z value View height (in model space units) Snap angle View twist angle Circle zoom percent Frozen layer object ID/handle (multiple entries may exist) (optional)

23 14

24 15

25 16

26, 36 17

27, 37 42 43 44 45 50 51 72 341

110

Chapter 6

ENTITIES Section

Viewport group codes (continued)


Group codes 90 Description Viewport status bit coded flags: 1 (0x1) = Enables perspective mode 2 (0x2) = Enables front clipping 4 (0x4) = Enables back clipping 8 (0x8) = Enables UCS follow 16 (0x10) = Enables front clip not at eye 32 (0x20) = Enables UCS icon visibility 64 (0x40) = Enables UCS icon at origin 128 (0x80) = Enables fast zoom 256 (0x100) = Enables snap mode 512 (0x200) = Enables grid mode 1024 (0x400) = Enables isometric snap style 2048 (0x800) = Enables hide plot mode 4096 (0x1000) = kIsoPairTop. If set and kIsoPairRight is not set, then isopair top is enabled. If both kIsoPairTop and kIsoPairRight are set, then isopair left is enabled 8192 (0x2000) = kIsoPairRight. If set and kIsoPairTop is not set, then isopair right is enabled 16384 (0x4000) = Enables viewport zoom locking 32768 (0x8000) = Currently always enabled 65536 (0x10000) = Enables non-rectangular clipping 131072 (0x20000) = Turns the viewport off Hard-pointer ID/handle to entity that serves as the viewports clipping boundary (only present if viewport is non-rectangular) Plot style sheet name assigned to this viewport Render mode: 0 = 2D Optimized (classic 2D) 1 = Wireframe 2 = Hidden line 3 = Flat shaded 4 = Gouraud shaded 5 = Flat shaded with wireframe 6 = Gouraud shaded with wireframe All rendering modes other than 2D Optimized engage the new 3D graphics pipeline. These values directly correspond to the SHADEMODE command and the AcDbAbstractViewTableRecord::RenderMode enum 71 UCS per viewport flag: 0 = The UCS will not change when this viewport becomes active. 1 = This viewport stores its own UCS which will become the current UCS whenever the viewport is activated

340

1 281

VIEWPORT

111

Viewport group codes (continued)


Group codes 74 Description Display UCS icon at UCS origin flag: Controls whether UCS icon represents viewport UCS or current UCS (these will be different if UCSVP is 1 and viewport is not active). However, this field is currently being ignored and the icon always represents the viewport UCS 110 UCS origin DXF: X value; APP: 3D point DXF: Y and Z values of UCS origin UCS X-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS X-axis UCS Y-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS Y-axis ID/handle of AcDbUCSTableRecord if UCS is a named UCS. If not present, then UCS is unnamed ID/handle of AcDbUCSTableRecord of base UCS if UCS is orthographic (79 code is non-zero). If not present and 79 code is non-zero, then base UCS is taken to be WORLD Orthographic type of UCS 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right Elevation

120, 130 111

121, 131 112

122, 132 345

346

79

146

NOTE The ZOOM XP factor is calculated with the following formula:


group_41 / group_45 (or pspace_height / mspace_height).

112

Chapter 6

ENTITIES Section

XLINE
The following group codes apply to xline entities. In addition to the group codes described here, see Common Group Codes for Entities on page 60. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. Xline group codes
Group codes 100 10 Description Subclass marker (AcDbXline) First point (in WCS) DXF: X value; APP: 3D point DXF: Y and Z values of first point (in WCS) Unit direction vector (in WCS) DXF: X value; APP: 3D vector DXF: Y and Z values of unit direction vector (in WCS)

20, 30 11

21, 31

XLINE

113

114

Chapter 6

ENTITIES Section

OBJECTS Section

7
In this chapter
s OBJECT Section Group Codes s Common Group Codes for

This chapter presents the group codes that apply to nongraphical objects. These codes are found in the OBJECTS section of a DXF file and are used by AutoLISP and ObjectARX applications in entity definition lists.

Objects
s ACAD_PROXY_OBJECT s ACDBDICTIONARYWDFLT s ACDBPLACEHOLDER s DICTIONARY s DICTIONARYVAR s DIMASSOC s GROUP s IDBUFFER s IMAGEDEF s IMAGEDEF_REACTOR s LAYER_INDEX s LAYER_FILTER s LAYOUT s MLINESTYLE s OBJECT_PTR s PLOTSETTINGS s RASTERVARIABLES s SPATIAL_INDEX s SPATIAL_FILTER s SORTENTSTABLE s VLA_PROJECT s XRECORD

115

OBJECT Section Group Codes


Objects are similar to entities, except that they have no graphical or geometric meaning. All objects that are not entities or symbol table records or symbol tables are stored in this section. This section represents a homogeneous heap of objects with topological ordering of objects by ownership, such that the owners always appear before the objects they own.

Object Ownership
The root owner of most objects appearing in the OBJECTS section is the named object dictionary, which is, therefore, always the first object that appears in this section. Objects that are not owned by the named object dictionary are owned by other entities, objects, or symbol table entries. Objects in this section may be defined by AutoCAD or by applications with access to ObjectARX API. The DXF names of application-defined object types should always be associated with a class name in the CLASS section of the DXF file, or else the object record cannot be bound to the application that will interpret it. As with other dictionaries, the named-object dictionary record consists solely of associated pairs of entry names and hard ownership pointer references to the associated object. To avoid name collision between objects, developers should always use their registered developer prefix for their entries.

Common Group Codes for Objects


The following table shows group codes that apply to virtually all nongraphical objects. When you refer to a table of group codes by object type, a list of codes associated a specific object, keep in mind that the codes shown here can also be present. Some of the group codes are included with an object only if the object has nondefault values for those group code properties. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

116

Chapter 7

OBJECTS Section

Common object group codes


Group codes 0 5 102 applicationdefined codes 102 102 Description Object type Handle Start of application defined group {application_name (optional) Codes and values within the 102 groups are application-defined (optional) End of group, } (optional) {ACAD_REACTORS indicates the start of the AutoCAD persistent reactors group. This group exists only if persistent reactors have been attached to this object (optional) Soft pointer ID/handle to owner dictionary (optional) End of group, } (optional) {ACAD_XDICTIONARY indicates the start of an extension dictionary group. This group exists only if persistent reactors have been attached to this object (optional) Hard owner ID/handle to owner dictionary (optional) End of group, } (optional) Soft-pointer ID/handle to owner object

330 102 102

360 102 330

ACAD_PROXY_OBJECT
The following group codes apply to ACAD_PROXY_OBJECT objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

ACAD_PROXY_OBJECT

117

ACAD_PROXY_OBJECT group codes


Group codes 100 90 91 Description DXF: Subclass marker (AcDbProxyObject) DXF: Proxy object class ID (always 499) DXF: Application objects class ID. Class IDs are based on the order of the class in the CLASSES section. The first class is given the ID of 500, the next is 501, and so on DXF: Size of object data in bits DXF: Binary object data (multiple entries can appear) (optional) DXF: An object ID (multiple entries can appear) (optional)

93 310 330 or 340 or 350 or 360 94 95

DXF: 0 (indicates end of object ID section) DXF: Object drawing format when it becomes a proxy (a 32-bit unsigned integer): Low word is AcDbDwgVersion High word is MaintenanceReleaseVersion DXF: Original custom object data format: 0 = DWG format 1 = DXF format

70

The 92 field is not used for AcDbProxyObject. Objects of this class never have graphics.

ACDBDICTIONARYWDFLT
The following group codes are used by ACDBDICTIONARYWDFLT objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

118

Chapter 7

OBJECTS Section

ACDBDICTIONARYWDFLT group codes


Group codes 0 5 102 330 102 330 100 281 Description Object name (ACDBDICTIONARYWDFLT) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-owner ID/handle to owner object Subclass marker (AcDbDictionary) Duplicate record cloning flag (determines how to merge duplicate entries): 0 = Not applicable 1 = Keep existing 2 = Use clone 3 = <xref>$0$<name> 4 = $0$<name> 5 = Unmangle name Entry name (one for each entry) Soft-owner ID/handle to entry object (one for each entry) Subclass marker (AcDbDictionaryWithDefault) Hard pointer to default object ID/handle (currently only used for plot style dictionarys default entry, named Normal)

3 350 100 340

ACDBPLACEHOLDER
The following group codes are used by the ACDBPLACEHOLDER objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

ACDBPLACEHOLDER

119

ACDBPLACEHOLDER group codes


Group codes 0 5 102 330 102 330 Description Object name (ACDBPLACEHOLDER) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-pointer ID/handle to owner object

DICTIONARY
The following group codes are used by DICTIONARY objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. DICTIONARY group codes
Group codes 0 5 102 330 102 330 100 280 Description Object name (DICTIONARY) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-pointer ID/handle to owner object Subclass marker (AcDbDictionary) Hard owner flag. If set to 1, indicates that elements of the dictionary are to be treated as hard owned

120

Chapter 7

OBJECTS Section

DICTIONARY group codes (continued)


Group codes 281 Description Duplicate record cloning flag (determines how to merge duplicate entries): 0 = Not applicable 1 = Keep existing 2 = Use clone 3 = <xref>$0$<name> 4 = $0$<name> 5 = Unmangle name Entry name (one for each entry) (optional) Soft-owner ID/handle to entry object (one for each entry) (optional)

3 350

AutoCAD maintains items such as mline styles and group definitions as objects in dictionaries. The following sections describe the AutoCAD object group codes maintained in dictionaries; however, other applications are free to create and use their own dictionaries as they see fit. The prefix "ACAD_" is reserved for use by AutoCAD applications.

DICTIONARYVAR
The following group codes are used by DICTIONARYVAR objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. DICTIONARYVAR group codes
Group codes 0 5 102 330 Description Object name (DICTIONARYVAR) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary (ACDBVARIABLEDICTIONARY) End of persistent reactors group, always }

102

DICTIONARYVAR

121

DICTIONARYVAR group codes (continued)


Group codes 100 280 1 Description Subclass marker (DictionaryVariables) Object schema number (currently set to 0) Value of variable

DICTIONARYVAR objects are used by AutoCAD as a means to store named values in the database for setvar/getvar purposes without the need to add entries to the DXF HEADER section. Currently, the system variables that are stored as DICTIONARYVAR objects are: DIMADEC, DIMDSEP, INDEXCTL, PROJECTNAME, and XCLIPFRAME.

DIMASSOC
The following group codes are used by DIMASSOC objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. DIMASSOC group codes
Group codes 0 5 102 330 100 330 Description Object name (DIMASSOC) Handle Persistent reactors group; always {ACAD_REACTORS} Soft-pointer ID Subclass marker (AcDbDimAssoc) ID of dimension object

122

Chapter 7

OBJECTS Section

DIMASSOC group codes (continued)


Group codes 90 Description Associativity flag 1 = First point reference 2 = Second point reference 4 = Third point reference 8 = Fourth point reference Trans-space flag (true/false) Rotated Dimension type (parallel, perpendicular) Class name (AcDbOsnapPointRef) Object Osnap type (Start, End, Mid, Cen, etc.) ID of main object (geometry) SubentType of main object (edge, face) GsMarker of main object (index) Handle (string) of Xref object Geometry parameter for Near Osnap Osnap point in WCS; X value Osnap point in WCS; Y value Osnap point in WCS; Z value ID of intersection object (geometry) SubentType of intersction object (edge/face) GsMarker of intersection object (index) Handle (string) of intersection Xref object hasLastPointRef flag (true/false)

70 71 1 72 331 73 91 301 40 10 20 30 332 74 92 302 75

DIMASSOC objects implement associative dimensions by specifying an association between a dimension object and drawing geometry objects. An

DIMASSOC

123

associative dimension is a dimension that will automatically update when the associated geometry is modified.

GROUP
The following group codes are used by GROUP objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. GROUP group codes
Group codes 0 5 102 Description Object name (GROUP) Handle Start of persistent reactors group; always {ACAD_REACTORS (persistent reactors group appears in all dictionaries except the main dictionary) Soft-pointer ID/handle to owner dictionary. For GROUP objects this is always the ACAD_GROUP entry of the named object dictionary End of persistent reactors group, always } Soft-pointer ID/handle to owner object Subclass marker (AcDbGroup) Group description Unnamed flag: 1 = Unnamed; 0 = Named Selectability flag: 1 = Selectable; 0 = Not selectable Hard-pointer handle to entity in group (one entry per object)

330

102 330 100 300 70 71 340

124

Chapter 7

OBJECTS Section

IDBUFFER
The following group codes are used by IDBUFFER objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. IDBUFFER group codes
Group codes 100 330 Description Subclass marker (AcDbIdBuffer) Soft pointer reference to entity (multiple entries may exist)

The IDBUFFER object is a utility object that is just a list of references to objects.

IMAGEDEF
The following group codes are used by IMAGEDEF objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

IDBUFFER

125

IMAGEDEF group codes


Group codes 0 5 102 330 330 Description Object name (IMAGEDEF) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to the ACAD_IMAGE_DICT dictionary Soft-pointer ID/handle to IMAGEDEF_REACTOR object (multiple entries; one for each instance) End of persistent reactors group, always } Subclass marker (AcDbRasterImageDef) Class version. 0 = R14 version File name of image Image size in pixels DXF: U value; APP: 2D point (U and V values) DXF: V value of image size in pixels Default size of one pixel in AutoCAD units DXF: U value; APP: 2D point (U and V values) DXF: V value of pixel size Image-is-loaded flag. 0 = Unloaded; 1 = Loaded Resolution units. 0 = No units; 2 = Centimeters; 5 = Inch

102 100 90 1 10

20 11

12 280 281

IMAGEDEF_REACTOR
The following group codes are used by IMAGEDEF_REACTOR objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

126

Chapter 7

OBJECTS Section

IMAGEDEF_REACTOR group codes


Group codes 0 5 100 90 330 Description Object name (IMAGEDEF_REACTOR) Handle Subclass marker (AcDbRasterImageDefReactor) Class version. 2 = R14 version Object ID for associated image object

LAYER_INDEX
The following group codes are used by LAYER_INDEX objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. LAYER_INDEX group codes
Group codes 0 5 102 330 102 100 40 100 8 360 90 Description Object name (LAYER_INDEX) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Subclass marker (AcDbIndex) Time stamp (Julian date) Subclass marker (AcDbLayerIndex) Layer name (multiple entries may exist) Hard owner reference to IDBUFFER (multiple entries may exist) Number of entries in the IDBUFFER list (multiple entries may exist)

LAYER_INDEX

127

LAYER_FILTER
The following group codes are used by LAYER_FILTER objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. LAYER_FILTER group codes
Group codes 0 5 102 330 102 100 100 8 Description Object name (LAYER_FILTER) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Subclass marker (AcDbFilter) Subclass marker (AcDbLayerFilter) Layer name (multiple entries may exist)

LAYOUT
The following group codes are used by LAYOUT objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. LAYOUT group codes
Group codes 0 5 Description Object name (LAYOUT) Handle

128

Chapter 7

OBJECTS Section

LAYOUT group codes (continued)


Group codes 102 330 102 330 100 Description Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-pointer ID/handle to owner object Subclass marker (AcDbPlotSettings)

plotsettings object For group codes and descriptions following the AcDbPlotSettings group codes marker, see PLOTSETTINGS on page 133 100 1 70 Subclass marker (AcDbLayout) Layout name Flag (bit-coded) to control the following: 1 = Indicates the PSLTSCALE value for this layout when this layout is current 2 = Indicates the LIMCHECK value for this layout when this layout is current Tab order. This number is an ordinal indicating this layouts ordering in the tab control that is attached to the AutoCAD drawing frame window. Note that the Model tab always appears as the first tab regardless of its tab order Minimum limits for this layout (defined by LIMMIN while this layout is current) DXF: X value; APP: 2D point DXF: Y value of minimum limits Maximum limits for this layout (defined by LIMMAX while this layout is current): DXF: X value; APP: 2D point DXF: Y value of maximum limits Insertion base point for this layout (defined by INSBASE while this layout is current): DXF: X value; APP: 3D point DXF: Y and Z values of the insertion base point

71

10

20 11

21 12

22, 32

LAYOUT

129

LAYOUT group codes (continued)


Group codes 14 Description Minimum extents for this layout (defined by EXTMIN while this layout is current): DXF: X value; APP: 3D point DXF: Y and Z values of the minimum extents Maximum extents for this layout (defined by EXTMAX while this layout is current): DXF: X value; APP: 3D point DXF: Y and Z values of the maximum extents Elevation UCS origin DXF: X value; APP: 3D point DXF: Y and Z values of UCS origin UCS X-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS X-axis UCS Y-axis DXF: X value; APP: 3D vector DXF: Y and Z values of UCS Y-axis Orthographic type of UCS 0 = UCS is not orthographic; 1 = Top; 2 = Bottom; 3 = Front; 4 = Back; 5 = Left; 6 = Right ID/handle to this layouts associated paper space block table record ID/handle to the viewport that was last active in this layout when the layout was current ID/handle of AcDbUCSTableRecord if UCS is a named UCS. If not present, then UCS is unnamed ID/handle of AcDbUCSTableRecord of base UCS if UCS is orthographic (76 code is non-zero). If not present and 76 code is non-zero, then base UCS is taken to be WORLD

24, 34 15

25, 35 146 13

23, 33 16

26, 36 17

27, 37 76

330 331

345

346

130

Chapter 7

OBJECTS Section

MLINESTYLE
The following group codes are used by MLINESTYLE objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. MLINESTYLE group codes
Group codes 0 5 102 Description Object name (MLINESTYLE) Handle Start of persistent reactors group; always {ACAD_REACTORS (persistent reactors group appears in all dictionaries except the main dictionary) Soft-pointer ID/handle to owner dictionary. For MLINESTYLE objects this is always the ACAD_MLINESTYLE entry of the named object dictionary End of persistent reactors group; always } Subclass marker (AcDbMlineStyle) Mline style name Flags (bit-coded): 1 =Fill on 2 = Display miters 16 = Start square end (line) cap 32 = Start inner arcs cap 64 = Start round (outer arcs) cap 256 = End square (line) cap 512 = End inner arcs 1024 = End round (outer arcs) cap Style description (string, 255 characters maximum) Fill color (integer, default = 256) Start angle (real, default is 90 degrees) End angle (real, default is 90 degrees) Number of elements

330

102 100 2 70

3 62 51 52 71

MLINESTYLE

131

MLINESTYLE group codes (continued)


Group codes 49 Description Element offset (real, no default). Multiple entries can exist; one entry for each element Element color (integer, default = 0). Multiple entries can exist; one entry for each element Element linetype (string, default = BYLAYER). Multiple entries can exist; one entry for each element

62

The 2 group codes in mline entities and MLINESTYLE objects are redundant fields. These groups should not be modified under any circumstances, although it is safe to read them and use their values. The correct fields to modify are: Mline Mlinestyle The 340 group in the same object, which indicates the proper MLINESTYLE object. The 3 group value in the MLINESTYLE dictionary, which precedes the 350 group that has the handle or entity name of the current mlinestyle.

OBJECT_PTR
The following group codes are used by OBJECT_PTR objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. OBJECT_PTR group codes
Group codes 0 5 102 330 102 Description Object name (OBJECT_PTR) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always }

132

Chapter 7

OBJECTS Section

OBJECT_PTR group codes (continued)


Group codes 1001 Description Begin ASE xdata (DC015)

PLOTSETTINGS
The following group codes are used by PLOTSETTINGS objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. PLOTSETTINGS group codes
Group codes 0 5 102 330 102 330 100 1 2 4 6 40 41 42 43 Description Object name (PLOTSETTINGS) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-pointer ID/handle to owner object Subclass marker (AcDbPlotSettings) Page Setup name Name of system printer or plot configuration file Paper size Plot view name Size, in millimeters, of unprintable margin on the left side of the paper Size, in millimeters, of unprintable margin on the bottom of the paper Size, in millimeters, of unprintable margin on the right side of the paper Size, in millimeters, of unprintable margin on the top of the paper

PLOTSETTINGS

133

PLOTSETTINGS group codes (continued)


Group codes 44 45 46 47 48 49 140 141 142 143 70 Description Plot paper size: physical paper width in millimeters Plot paper size: physical paper height in millimeters Plot origin: X value of origin offset in millimeters Plot origin: Y value of origin offset in millimeters Plot window area: X value of lower left window corner Plot window area: Y value of upper right window corner Plot window area: X value of lower left window corner Plot window area: Y value of upper right window corner Numerator of custom print scale: real world (paper) units Denominator of custom print scale: drawing units Plot layout flag: 1 = PlotViewportBorders 2 = ShowPlotStyles 4 = PlotCentered 8 = PlotHidden 16 = UseStandardScale 32 = PlotPlotStyles 64 = ScaleLineweights 128 = PrintLineweights 512 = DrawViewportsFirst 1024 = ModelType 2048 = UpdatePaper 4096 = ZoomToPaperOnUpdate 8192 = Initializing 16384 = PrevPlotInit Plot paper units: 0 = Plot in inches 1 = Plot in millimeters 2 = Plot in pixels Plot rotation: 0 = No rotation 1 = 90 degrees counterclockwise 2 = Upside down 3 = 90 degrees clockwise

72

73

134

Chapter 7

OBJECTS Section

PLOTSETTINGS group codes (continued)


Group codes 74 Description Plot type (portion of paperspace to output to the media): 0 = Last screen display 1 = Drawing extents 2 = Drawing limits 3 = View specified by code 6 4 = Window specified by codes 48, 49, 140, and 141 5 = Layout information Current style sheet Standard scale type: 0 = Scaled to Fit 1 = 1/128"=1'; 2 = 1/64"=1'; 3 = 1/32"=1' 4 = 1/16"=1'; 5 = 3/32"=1'; 6 = 1/8"=1' 7 = 3/16"=1'; 8 = 1/4"=1'; 9 = 3/8"=1' 10 = 1/2"=1'; 11 = 3/4"=1'; 12 = 1"=1' 13 = 3"=1'; 14 = 6"=1'; 15 = 1'=1' 16= 1:1 ; 17= 1:2; 18 = 1:4; 19 = 1:8; 20 = 1:10; 21= 1:16 22 = 1:20; 23 = 1:30; 24 = 1:40; 25 = 1:50; 26 = 1:100 27 = 2:1; 28 = 4:1; 29 = 8:1; 30 = 10:1; 31 = 100:1; 32 = 1000:1 A floating point scale factor that represents the standard scale value specified in code 75 Paper image origin: X value Paper image origin: Y value

7 75

147

148 149

RASTERVARIABLES
The following group codes are used by RASTERVARIABLES objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. RASTERVARIABLES group codes
Group codes 0 5 102 Description Object name (RASTERVARIABLES) Handle Start of persistent reactors group; always {ACAD_REACTORS

RASTERVARIABLES

135

RASTERVARIABLES group codes (continued)


Group codes 330 Description Soft-pointer ID/handle to owner dictionary. For a RASTERVARIABLES object this is always the ACAD_IMAGE_VARS entry of the named object dictionary End of persistent reactors group, always } Subclass marker (AcDbRasterVariables) Class version. 0 = R14 version Display-image-frame flag. 0 = No frame; 1 = Display frame Image display quality (screen only). 0 = Draft; 1 = High AutoCAD units for inserting images. This is what one AutoCAD unit is equal to for the purpose of inserting and scaling images with an associated resolution: 0 = None; 1 = Millimeter; 2 = Centimeter; 3 = Meter; 4 = Kilometer; 5 = Inch; 6 = Foot; 7 = Yard; 8 = Mile

102 100 90 70 71 72

SPATIAL_INDEX
The following group codes are used by SPATIAL_INDEX objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. SPATIAL_INDEX group codes
Group codes 0 5 102 330 102 100 Description Object name (SPATIAL_INDEX) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Subclass marker (AcDbIndex)

136

Chapter 7

OBJECTS Section

SPATIAL_INDEX group codes (continued)


Group codes 40 100 Description Timestamp (Julian date) Subclass marker (AcDbSpatialIndex)

The SPATIAL_INDEX is always written out empty to a DXF file. This object can be ignored.

SPATIAL_FILTER
The following group codes are used by SPATIAL_FILTER objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. SPATIAL_FILTER group codes
Group codes 0 5 102 330 102 100 100 70 Description Object name (SPATIAL_FILTER) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary (SPATIAL) End of persistent reactors group, always } Subclass marker (AcDbFilter) Subclass marker (AcDbSpatialFilter) Number of points on the clip boundary 2 = Rectangular clip boundary (lower-left and upper-right) greater than 2 = Polyline clip boundary Clip boundary definition point (in OCS) (always 2 or more) based on an xref scale of 1 DXF: X value; APP: 2D point DXF: Y value of boundary definition point (always 2 or more)

10

20

SPATIAL_FILTER

137

SPATIAL_FILTER group codes (continued)


Group codes 210 Description Normal to the plane containing the clip boundary DXF: X value; APP: 3D vector DXF: Y and Z values of extrusion direction Origin used to define the local coordinate system of the clip boundary DXF: X value; APP: 3D point Origin used to define the local coordinate system of the clip boundary DXF: Y and Z values Clip boundary display enabled flag 0 = Disabled; 1 = Enabled Front clipping plane flag; 0 = No; 1 = Yes Front clipping plane distance (if code 72 = 1) Back clipping plane flag; 0 = No; 1 = Yes Back clipping plane distance (if code 73 = 1) 4x3 transformation matrix written out in column major order. This matrix is the inverse of the original block reference (insert entity) transformation. The original block reference transformation is the one that is applied to all entities in the block when the block reference is regenerated (always 12 entries) 4x3 transformation matrix written out in column major order. This matrix transforms points into the coordinate system of the clip boundary (12 entries)

220, 230 11

21, 31

71

72 40 73 41 40

40

SORTENTSTABLE
The following group codes are used by SORTENTSTABLE objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

138

Chapter 7

OBJECTS Section

SORTENTSTABLE group codes


Group codes 0 5 102 330 102 100 330 Description Object name (SORTENTSTABLE) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary (ACAD_SORTENTS) End of persistent reactors group, always } Subclass marker (AcDbSortentsTable) Soft pointer ID/handle to owner (currently only the *MODEL_SPACE or *PAPER_SPACE blocks) Soft pointer ID/handle to an entity (zero or more entries may exist) Sort handle (zero or more entries may exist)

331 5

If the SORTENTS Regen flag (bit-code value 16) is set, AutoCAD regenerates entities in ascending handle order. When the DRAWORDER command is used, a SORTENTSTABLE object is attached to the *Model_Space or *Paper_Space blocks extension dictionary under the name ACAD_SORTENTS. The SORTENTSTABLE object related to this dictionary associates a different handle with each entity which redefines the order that the entities are regenerated.

VBA_PROJECT
The following group codes are used by VBA_PROJECT objects. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

VBA_PROJECT

139

VBA_PROJECT group codes


Group codes 0 5 102 330 102 330 100 90 Description Object name (VBA_PROJECT) Handle Start of persistent reactors group; always {ACAD_REACTORS Soft-pointer ID/handle to owner dictionary End of persistent reactors group, always } Soft-owner ID/handle to owner object Subclass marker (AcDbVbaProject) Number of bytes of binary chunk data (contained in the group code 310 records that follow) DXF: Binary object data (multiple entries containing VBA project data)

310

XRECORD
The following group codes are common to all xrecord objects. In addition to the group codes described here, see Common Group Codes for Objects on page 116. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6.

140

Chapter 7

OBJECTS Section

Xrecord group codes


Group codes 100 280 Description Subclass marker (AcDbXrecord) Duplicate record cloning flag (determines how to merge duplicate entries): 0 = Not applicable 1 = Keep existing 2 = Use clone 3 = <xref>$0$<name> 4 = $0$<name> 5 = Unmangle name

1369 (except 5 These values can be used by an application in any way and 105)

Xrecord objects are used to store and manage arbitrary data. They are composed of DXF group codes with normal object groups, (that is, non-xdata group codes) ranging from 1 through 369 for supported ranges. This object is similar in concept to xdata but is not limited by size or order. Xrecord objects are designed to work in such a way as to not offend releases R13c0 through R13c3. However, if read into a pre-R13c4 level of AutoCAD, xrecord objects disappear.

XRECORD

141

142

Chapter 7

OBJECTS Section

THUMBNAILIMAGE Section

8
In this chapter
s THUMBNAILIMAGE Section

This chapter presents the group codes that are found in the THUMBNAILIMAGE section of a DXF file. This section exists only if a preview image has been saved with the DXF file.

Group Codes

143

THUMBNAILIMAGE Section Group Codes


The following group codes are found in the THUMBNAILIMAGE section. For information about abbreviations and formatting used in this table, see Formatting Conventions in This Reference on page 6. THUMBNAILIMAGE group codes
Group codes 90 Description The number of bytes in the image (and subsequent binary chunk records) Preview image data (multiple lines; 256 characters maximum per line)

310

144

Chapter 8

THUMBNAILIMAGE Section

Drawing Interchange File Formats

A
In this chapter
s ASCII DXF Files s Binary DXF Files s Slide Files s Slide Library Files

This appendix describes the various file formats AutoCAD uses to interchange drawing data with other applications. The formats presented are Drawing Interchange File (DXF), binary DXF, Slide (SLD), and the Slide Library (SLB) file formats. DXF files can be either ASCII or binary formats. Because ASCII DXF files are more common than the binary format, the term DXF file is used to refer to ASCII DXF files and the term binary DXF file is used for the binary format.

145

ASCII DXF Files


This section describes the format of ASCII DXF files. It contains information that is needed only if you write your own programs to process DXF files or work with entity information obtained by AutoLISP and ObjectARX applications.

General DXF File Structure


Essentially a DXF file is composed of pairs of codes and associated values. The codes, known as group codes, indicate the type of value that follows. Using these group code and value pairs, a DXF file is organized into sections, composed of records, which are composed of a group code and a data item. Each group code and value is on its own line in the DXF file. Each section starts with a group code 0 followed by the string, SECTION. This is followed by a group code 2 and a string indicating the name of the section (for example, HEADER). Each section is composed of group codes and values that define its elements. A section ends with a 0 followed by the string ENDSEC. It may be helpful to produce a DXF file from a small drawing, print it out, and refer to it while reading the information presented in this section. The overall organization of a DXF file is as follows:
s

HEADER section. Contains general information about the drawing. It consists of an AutoCAD database version number and a number of system variables. Each parameter contains a variable name and its associated value. CLASSES section. Holds the information for application-defined classes, whose instances appear in the BLOCKS, ENTITIES, and OBJECTS sections of the database. A class definition is permanently fixed in class hierarchy. TABLES section. Contains definitions for the following symbol tables. APPID (application identification table) BLOCK_RECORD (block reference table) DIMSTYLE (dimension style table) LAYER (layer table) LTYPE (linetype table) STYLE (text style table) UCS (User Coordinate System table)

146

Appendix A

Drawing Interchange File Formats

VIEW (view table) VPORT (viewport configuration table)


s s s

BLOCKS section. Contains block definition and drawing entities that make up each block reference in the drawing. ENTITIES section. Contains the graphical objects (entities) in the drawing, including block references (insert entities). OBJECTS section. Contains the nongraphical objects in the drawing. All objects that are not entities or symbol table records or symbol tables are stored in this section. Examples of entries in the OBJECTS section are dictionaries that contain mline styles and groups. THUMBNAILIMAGE section. Contains the preview image data for of the drawing. This section is optional.

If you use the Select Objects option of the SAVE and SAVEAS commands, the resulting DXF file contains only the ENTITIES section and the EOF marker. The ENTITIES section contains only the objects you select for output. If you select an insert entity, the corresponding block definition is not included in the output file.

Group Codes in DXF Files


Group codes and the associated values define a specific aspect of an object or entity. The line immediately following the group code is the associated value. This value can be a a string, an integer, or a floating-point value, such as the X coordinate of a point. The lines following the second line of the group, if any, are determined by the group definition and the data associated with the group. Special group codes are used as file separators, such as markers for the beginning and end of sections, tables, and the end of the file itself. Entities, objects, classes, tables and table entries, and file separators are introduced with a 0 group code that is followed by a name describing the group. The maximum DXF file string length is 256 characters. If your AutoCAD drawing contains strings that exceed this number, those strings are truncated during SAVE, SAVEAS, and WBLOCK. OPEN and INSERT fail if your DXF file contains strings that exceed this number.

ASCII Control Characters in DXF Files


SAVEAS handles ASCII control characters in text strings by expanding the character into a caret (^) followed by the appropriate letter. For example, an ASCII Control-G (BEL, decimal code 7) is written as ^G. If the text itself

ASCII DXF Files

147

contains a caret character, it is expanded to caret, space (^ ). OPEN and INSERT perform the complementary conversion.

Header Group Codes in DXF Files


Applications can retrieve the values of these variables with the AutoLISP getvar function. The following is an example of the HEADER section of a DXF file:
0 SECTION 2 HEADER 9 $<variable> <group code> <value> 0 ENDSEC

Beginning of HEADER section

Repeats for each header variable

End of HEADER section

Class Group Codes in DXF Files


The following is an example of the CLASSES section of a DXF file:
0 SECTION 2 CLASSES 0 CLASS 1 <class dxf record> 2 <class name> 3 <app name> 90 <flag> 280 <flag> 281 <flag> 0 ENDSEC

Beginning of CLASSES section

Repeats for each entry

End of CLASSES section

148

Appendix A

Drawing Interchange File Formats

Symbol Table Group Codes in DXF Files


The following is an example of the TABLES section of a DXF file.
0 SECTION 2 TABLES 0 TABLE 2 <table type> 5 <handle> 100 AcDbSymbolTable 70 <max. entries>

Beginning of TABLES section

Common table group codes, repeats for each entry

0 Table entry data, repeats, for each table record <table type> 5 <handle> 100 AcDbSymbolTableRecord . . <data> . 0 ENDTAB 0 ENDSEC

End of table End of TABLES section

Symbol Table Example


This DXF sequence represents three full objects: the symbol table itself plus two entries.
0 TABLE 2 STYLE

Indicates a symbol table entry Text style symbol table entry. Exception to rule that code 0 fully defines type

ASCII DXF Files

149

5 1C 70 3 1001 APP_X 1040 42.0 0 STYLE 5 3A 2 ENTRY_1 70 64 40 .4 41 1.0 50 0.0 71 0 42 0.4 3 BUFONTS.TXT

STYLE table handle; same as for entities and other objects Maximum number of STYLE table records to follow (pre-Release 13 field) APP_X has put xdata on a symbol table Just a single floating-point number Beginning of first element in the STYLE symbol table The first entrys handle (DIMSTYLE entries will have 105 here) The first entrys text name Standard flag values Text height Width scale factor Oblique angle Text generation flags Last height used Primary font file name

150

Appendix A

Drawing Interchange File Formats

0 STYLE 5 C2 2 ENTRY_2 ... ... 3 BUFONTS.TXT 102 {ACAD_REACTORS 330 3C2 330 41B 102 } 1001 APP_1 1070 45 1001 APP_2 1004 18A5B3EF2C199A 0 UCS

Second entry begins. No xdata or persistent reactors on first entry Second entry handle Second entry text name Other fields down to group code 3 Primary font file name and last object typespecific group This entry has two persistent reactors Soft ID to first reactor object Soft ID to first reactor object Indicates the end of the reactor set Xdata attached to this entry

Start of UCS table (and end of previous record and table)

ASCII DXF Files

151

Blocks Group Codes in DXF Files


The following is an example of the BLOCKS section of a DXF file:
0 SECTION 2 BLOCKS 0 BLOCK 5 <handle> 100 AcDbEntity 8 <layer> 100 AcDbBlockBegin 2 <block name> 70 <flag> 10 <X value> 20 <Y value> 30 <Z value> 3 <block name> 1 <xref path> 0 <entity type> . . <data> . 0 ENDBLK 5 <handle> 100 AcDbBlockEnd 0 ENDSEC

Beginning of BLOCKS section

Begins each block entry (a block entity definition)

One entry for each entity definition within the block

End of each block entry (an endblk entity definition)

End of BLOCKS section

152

Appendix A

Drawing Interchange File Formats

Entity Group Codes in DXF Files


The following is an example of the ENTITIES section of a DXF file:
0 SECTION 2 ENTITIES 0 <entity type> 5 <handle> 330 <pointer to owner> 100 AcDbEntity 8 <layer> 100 AcDb<classname> . . <data> . 0 ENDSEC

Beginning of ENTITIES section

One entry for each entity definition

End of ENTITIES section

Object Group Codes in DXF Files


The following is an example of the OBJECTS section of a DXF file:
0 SECTION 2 OBJECTS 0 DICTIONARY 5 <handle> 100 AcDbDictionary 3 <dictionary name> 350 <handle of child>

Beginning of OBJECTS section

Beginning of named object dictionary (root dictionary object)

Repeats for each entry

ASCII DXF Files

153

0 <object type> . . <data> . 0 ENDSEC

Groups of object data

End of OBJECTS section

Writing a DXF Interface Program


Writing a program that communicates with AutoCAD by means of the DXF file appears more difficult than it actually is. The DXF format makes it easy to ignore information you dont need, while reading the information you do need.

Reading a DXF File


The following example is a simple Visual Basic program that reads a DXF file and extracts specific codes and values from a given object in a given section.

154

Appendix A

Drawing Interchange File Formats

' ReadDXF extracts specified code/value pairs from a DXF file. ' This function requires four string parameters, a valid DXF ' file name, a DXF section name, the name of an object in that ' section, and a comma delimited list of codes. ' Function ReadDXF( _ ByVal dxfFile As String, ByVal strSection As String, _ ByVal strObject As String, ByVal strCodeList As String) Dim tmpCode, lastObj As String Open dxfFile For Input As #1 ' Get the first code/value pair codes = ReadCodes ' Loop through the whole file until the "EOF" line While codes(1) <> "EOF" ' If the group code is '0' and the value is 'SECTION' .. If codes(0) = "0" And codes(1) = "SECTION" Then ' This must be a new section, so get the next ' code/value pair. codes = ReadCodes() ' If this section is the right one .. If codes(1) = strSection Then ' Get the next code/value pair and .. codes = ReadCodes ' Loop through this section until the 'ENDSEC' While codes(1) <> "ENDSEC" ' While in a section, all '0' codes indicate ' an object. If you find a '0' store the ' object name for future use. If codes(0) = "0" Then lastObj = codes(1) ' If this object is one you're interested in If lastObj = strObject Then ' Surround the code with commas tmpCode = "," & codes(0) & "," ' If this code is in the list of codes .. If InStr(strCodeList, tmpCode) Then ' Append the return value. ReadDXF = ReadDXF & _ codes(0) & "=" & codes(1) & vbCrLf End If End If ' Read another code/value pair codes = ReadCodes Wend End If Else codes = ReadCodes End If Wend Close #1 End Function ' ' ' ' ' ReadCodes reads two lines from an open file and returns a two item array, a group code and its value. As long as a DXF file is read two lines at a time, all should be fine. However, to make your code more reliable, you should add some additional error and sanity checking.

ASCII DXF Files

155

' Function ReadCodes() As Variant Dim codeStr, valStr As String Line Input #1, codeStr Line Input #1, valStr ' Trim the leading and trailing space from the code ReadCodes = Array(Trim(codeStr), valStr) End Function

Writing a DXF File


Writing a program that creates a DXF file can be more difficult than one that reads a DXF file, because you must maintain consistency within the drawing in order for AutoCAD to find the file acceptable. AutoCAD lets you omit many items in a DXF file and still obtain a usable drawing.
s s

s s s s

The entire HEADER section can be omitted if you dont set header variables. Any of the tables in the TABLES section can be omitted if you dont need to make entries, and the entire TABLES section can be dropped if nothing in it is required. If you define any linetypes in the LTYPE table, this table must appear before the LAYER table. If no block definitions are used in the drawing, the BLOCKS section can be omitted. If present, the BLOCKS section must appear before the ENTITIES section. Within the ENTITIES section, you can reference layer names even though you havent defined them in the LAYER table. Such layers are automatically created with color 7 and the CONTINUOUS linetype. The EOF item must be present at the end of file.

156

Appendix A

Drawing Interchange File Formats

The following Visual Basic subroutine constructs a DXF file representing a polygon.
' WriteDXFPolygon creates a minimal DXF file that only contains ' the ENTITIES section. This subroutine requires five parameters, ' the DXF file name, the number of sides for the polygon, the X ' and Y coordinates for the bottom end of the right-most side ' (it starts in a vertical direction), and the length for each ' side. Note that because this only requests 2D points, it does ' not include the Z coordinates (codes 30 and 31). The lines are ' placed on the layer "Polygon." ' Sub WriteDXFPolygon( _ dxfFile As String, iSides As Integer, _ dblX As Double, dblY As Double, dblLen As Double) Dim i As Integer Dim dblA1, dblA, dblPI, dblNX, dblNY As Double Open dxfFile For Output As #1 Print #1, 0 Print #1, "SECTION" Print #1, 2 Print #1, "ENTITIES" dblPI = Atn(1) * 4 dblA1 = (2 * dblPI) / iSides dblA = dblPI / 2 For i = 1 To iSides Print #1, 0 Print #1, "LINE" Print #1, 8 Print #1, "Polygon" Print #1, 10 Print #1, dblX Print #1, 20 Print #1, dblY dblNX = dblLen * Cos(dblA) + dblX dblNY = dblLen * Sin(dblA) + dblY Print #1, 11 Print #1, dblNX Print #1, 21 Print #1, dblNY dblX = dblNX dblY = dblNY dblA = dblA + dblA1 Next i Print #1, 0 Print #1, "ENDSEC" Print #1, 0 Print #1, "EOF" Close #1 End Sub

As long as a properly formatted item appears on the line on which the data is expected, DXFIN accepts it. (Of course, string items should not have leading spaces unless these are intended to be part of the string.) This BASIC program

ASCII DXF Files

157

takes advantage of this flexibility in input format and does not generate a file exactly like one generated by AutoCAD. In the case of an error in using DXFIN to load, AutoCAD reports the error with a message indicating the nature of the error and the last line processed in the DXF file before the error was detected. This may not be the line on which the error occurred, especially in the case of errors such as the omission of required groups.

Binary DXF Files


The ASCII DXF file format is a complete representation of an AutoCAD drawing in an ASCII text form, and is easily processed by other programs. In addition, AutoCAD can produce or read a binary form of the full DXF file and accept limited input in another binary file format. The SAVE and SAVEAS commands provide a Binary option that writes binary DXF files. Such a file contains all of the information present in an ASCII DXF file but in a more compact form that takes, typically, 25 percent less file space. It can be read and written more quickly (typically, five times faster) by AutoCAD. Unlike ASCII DXF files, which entail a trade-off between size and floating-point accuracy, binary DXF files preserve all of the accuracy in the drawing database. (AutoCAD Release 10 was the first version to support this form of DXF file; it cannot be read by older versions.) A binary DXF file begins with a 22-byte sentinel consisting of the following:
AutoCAD Binary DXF<CR><LF><SUB><NULL>

Following the sentinel are pairs (group, value) as in an ASCII DXF file but represented in binary form. The group code is a 2-byte binary value (1-byte in DXF files prior to AutoCAD Release 14), and the value that follows is one of the following:
s s s

A 2-byte integer with the least significant byte first and the most significant byte last An 8-byte IEEE double-precision floating-point number stored with the least significant byte first and the most significant byte last An ASCII string terminated by a 0 (NULL) byte

158

Appendix A

Drawing Interchange File Formats

The type of data following a group is determined from the group code by the same rules used in decoding ASCII DXF files. Translation of angles to degrees and dates to fractional Julian date representation is performed for binary files, as well as for ASCII DXF files. The comment group, 999, is not used in binary DXF files. Extended data group codes are represented in binary DXF as a single byte with the value 255, followed by a 2-byte integer value containing the actual group code, followed by the actual value. Extended data long (group code 1071) values occupy 4 bytes of data. Extended data binary chunks (group code 1004) are represented as a singlebyte, unsigned integer length, followed by the specified number of bytes of chunk data. For example, to transfer an extended data long group, the following values would appear, occupying 1, 2, and 4 bytes respectively.
255 1071 999999

Escape group code True group code Value for the 1071 group code

SAVEAS writes binary DXF files with the same file type (.dxf) as for ASCII DXF files. The OPEN and INSERT commands automatically recognizes a binary file

by means of its sentinel string. You need not identify it as a binary file. If the OPEN and INSERT commands encounter an error in a binary DXF file, AutoCAD reports the byte address within the file where the error was detected.

Slide Files
NOTE This information is for experienced programmers, and is subject to
change without notice. AutoCAD slide files are screen images written by the MSLIDE command and read by the VSLIDE command. This section describes the format of slide files for the benefit of developers who wish to incorporate support for slides into their programs. A slide file consists of a header portion (31 bytes) and one or more data records of variable length. All coordinates and sizes written to the slide file reflect the drawing area of the display device from which the slide was created with point (0,0) located at the lower-left corner of the drawing area. For

Slide Files

159

AutoCAD Release 9 and later, the slide file header consists of the following fields: Slide file header
Field ID string Type indicator Level indicator High X dot High Y dot Aspect ratio Bytes 17 1 1 2 2 4 Description AutoCAD Slide CR LF ^Z NUL Currently set to 56 (decimal) Currently set to 2 Width of the graphics area: 1, in pixels Height of the graphics area: 1, in pixels Drawing area aspect ratio (horizontal size/vertical size in inches), scaled by 10,000,000. This value is always written with the least significant byte first Either 0 or 2 (value is unimportant) A number (1234 hex) used to determine whether all 2-byte values in the slide were written with the high-order byte first (Intel 8086-family CPUs) or the low-order byte first (Motorola 68000-family CPUs)

Hardware fill Test number

2 2

Data records follow the header. Each data record begins with a 2-byte field whose high-order byte is the record type. The remainder of the record may be composed of 1-byte or 2-byte fields as described in the following table. To determine whether the 2-byte fields are written with the high-order byte first or the low-order byte first, examine the Test number field of the header that is described in the previous table. Slide file data records
Record type (hex) Bytes 00-7F 8 Meaning Vector Description The from-X coordinate for an ordinary vector. From-Y, to-X, and to-Y follow in that order as 2-byte values. The from point is saved as the last point Reserved for future use

80-FA

Undefined

160

Appendix A

Drawing Interchange File Formats

Slide file data records (continued)


Record type (hex) Bytes FB 5 Meaning Offset vector Description The low-order byte and the following three bytes specify the endpoints (from-X, from-Y, to-X, to-Y) of a vector, in terms of offsets (128 to +127) from the saved last point. The adjusted from point is saved as the last point for use by subsequent vectors The low-order byte is 00 The low-order byte is always zero. The following two 2-byte values specify the X and Y coordinates of one vertex of a polygon to be solid filled. Three to ten such records occur in sequence. A Solid fill record with a negative Y coordinate indicates the start or end of such a flood sequence. In the start record, the X coordinate indicates the number of vertex records to follow This is a vector starting at the last point. The low-order byte and the following byte specify to-X and to-Y in terms of offsets (128 to +127) from the saved last point. The adjusted to point is saved as the last point for use by subsequent vectors Subsequent vectors are to be drawn using the color number indicated by the low-order byte

FC FD

2 6

End of file Solid fill

FE

Common endpoint vector

FF

New color

If a slide contains any vectors at all, a New color record will be the first data record. The order of the vectors in a slide, and the order of the endpoints of those vectors, may vary. For example, the following is an annotated hex dump of a simple slide file created on an IBM PC/AT with an IBM Enhanced Graphics Adapter. The slide consists of a white diagonal line from the lower-left corner to the upper-right corner of the drawing area, a green vertical line near the lower-left corner, and a small red rectangle at the lower-left corner.

Slide Files

161

41 75 44 20 65 0D 56 02 3C 02 24 01 0B 80 02 00 34 12 07 FF 3C 02 3 FF 0F 00

74 6F 43 41 53 6C 69 64 0A 1A 00

ID string (AutoCAD Slide CR LF ^Z NUL) Type indicator (56) Level indicator (2) High X dot (572) High Y dot (292) Aspect ratio (14,647,307 / 10,000,000 = 1.46) Hardware fill (2) Test number (1234 hex) New color (7 = white) Vector from 572,292 to 0,0. 572,292 becomes last point New color (3 = green) Vector from 15,50 to 15,19. \x1115,50 becomes last point New color (1 = red) Offset vector from 15+18,50-25 (33,25) to 15+18, 50-50 (33,0). 33,25 becomes last point Common-endpoint vector from 33,25 to 33-33,25+0 (0,25). 0,25 becomes last point Common-endpoint vector from (0,25) to 0+0,25-25 (0,0). 0,0 becomes last point Common-endpoint vector from (0,0) to 0+33,0+0 (33,0).33,0 becomes last point End of file

DF 00

24 01 00 00 00 00 32 00 0F 00 13 00

01 FF 12 FB E7 12 CE DF FE 00 00 FE E7 21 FE 00 00 FC

Old Slide Header


The slide format described in the previous section is produced by AutoCAD Release 9 and later, and is portable among all computers running AutoCAD Release 9 or later. Previous versions of AutoCAD (as well as AutoShade 1.0 and AutoSketch 1.02) produce slides with a somewhat different header, as shown in the following table. Old slide file header
Field ID string Type indicator Level indicator High X dot High Y dot Aspect ratio Bytes 17 1 1 2 2 8 Description AutoCAD Slide CR LF ^Z NUL 56 (decimal) 1 (old format) Width of the drawing area: 1, in pixels Height of the drawing area: 1, in pixels Drawing area aspect ratio (horizontal size/vertical size in inches), written as a floating-point number

162

Appendix A

Drawing Interchange File Formats

Old slide file header (continued)


Field Hardware fill Filler byte Bytes 2 1 Description Either 0 or 2 (value is unimportant) Unused

Note that the old-format header does not contain a test number field. The floating-point aspect ratio value and all 2-byte integers are written in the native format of the CPU that was used to create the file (for 8086-family CPUs, IEEE double-precision, and low-order byte first). Old-format slide files are not portable across machine types, but they can be read by any version of AutoCAD running on the same CPU type as the CPU with which the slide was created.

Slide Library Files


This section describes the format of AutoCAD slide libraries (Release 9 and later) for the benefit of developers who wish to incorporate support for slide libraries into their programs. The general format of a slide library is as follows:
"AutoCAD Slide Library 1.0" CR LF ^Z NUL NUL NUL NUL Header (32 bytes)

One or more slide directory entries (36 bytes each) One or more slides (variable length) Slide directory entries have the following format: Slide name (NUL terminated) (32 bytes) Address of slide within library file (4 bytes) The slide address is always written with the low-order byte first. Each slide to which the directory points is a complete slide file as described in the previous section. The end of the slide directory is signified by an entry with a null slide name (first byte is NUL). A slide library can contain a mixture of old-format and new-format slides.

Slide Library Files

163

164

Appendix A

Drawing Interchange File Formats

Advanced DXF Issues

B
In this chapter
s Database Objects s Persistent Inter-Object

This appendix discusses the advanced concepts related to DXF group codes.

Reference Handles
s Subclass Markers s Extension Dictionary and

Persistent Reactors
s Extended Data s Object Coordinate Systems

(OCS)
s Arbitrary Axis Algorithm

165

Database Objects
AutoCAD drawings consist largely of structured containers for database objects. Database objects each have the following:
s

s s s

Handle whose value is unique to the drawing/DXF file, and is constant for the lifetime of the drawing. This format has existed since AutoCAD Release 10, but as of AutoCAD Release 13, handles are always enabled. Optional xdata table, just as entities have had since AutoCAD Release 11. Optional persistent reactor table. Optional ownership pointer to an extension dictionary, which in turn owns subobjects placed in it by an application.

Symbol tables and symbol table records are database objects and, thus, have a handle. They can also have xdata and persistent reactors in their DXF records.

Persistent Inter-Object Reference Handles


A set of group code ranges permit objects to directly specify references to other objects within the same drawing/DXF file. Four ranges are provided for the four types of reference handles that you can specify:
s s s s

Soft-pointer handle Hard-pointer handle Soft-owner handle Hard-owner handle

These handle types are manifested as entity names in AutoLISP , as ads_name values in ObjectARX and as like-named classes derived from ObjectARX. These values are always maintained in insert, xref, and wblock operations such that references between objects in a set being copied are updated to point to the copied objects, while references to other objects remain unchanged. Also, a group code range for arbitrary handles is defined to allow convenient storage of handle values that are not converted to entity names and then translated in insert, xref, or wblock.

166

Appendix B Advanced DXF Issues

NOTE If you use 1005 xdata group codes to store handles, they are treated as
soft-pointer handles, which means that when groups of objects are copied or inserted into another drawing, references between the involved objects are translated. Although 1005 xdata items are always returned as handles in AutoLISP and ObjectARX, all of the reference handle group code ranges are represented as entity names in AutoLISP and as ads_name structures in ObjectARX.

Pointer and Ownership References


A pointer is a reference that indicates usage but not possession or responsibility for another object. Pointer references mean that the object uses the other object in some way, and shares access to it. An ownership reference means that an owner object is responsible for the objects for which it has an owner handle. Ownership references direct the writing of the entire DWG and DXF files in a generic manner, such as beginning from a few key root objects. An object can have any number of pointer references associated with it, but it can have only one owner.

Hard and Soft References


Hard references, whether they are pointer or owner, protect an object from being purged. Soft references do not. In AutoCAD, block definitions and complex entities are hard owners of their elements. A symbol table and dictionaries are soft owners of their elements. Polyline entities are hard owners of their vertex and seqend entities. Insert entities are hard owners of their attrib and seqend entities. When establishing a reference to another object, it is recommended that you think about whether the reference should protect an object from the PURGE command.

Arbitrary Handles
Arbitrary handles are distinct in that they are not translated to session persistent identifiers internally, to entity names in AutoLISP, and so on. They are stored as handles. When translation of handle values are translated in drawing-merge operations, arbitrary handles are ignored.

Persistent Inter-Object Reference Handles

167

In all environments, arbitrary handles can be exchanged for entity names of the current drawing by means of the handent functions. A common usage of arbitrary handles is to refer to objects in external DXF and DWG files.

1005 Group Codes


1005 xdata group codes have the same behavior and semantics as soft pointers, which means that they are translated whenever the host object is merged into a different drawing. However, 1005 items are not translated to sessionpersistent identifiers, internally entity names in AutoLISP and ObjectARX. They are stored as handles.

Subclass Markers
When filing a stream of group data, a single object may be composed of several filer members, one for each level of inheritance where filing is done. Since derived classes and levels of inheritance can evolve separately, the data of each class filer member must be segregated from other members. This is achieved using subclass markers. All class filer members are expected to precede their class-specific portion of instance data with a subclass markera 100 group code followed by a string with the actual name of the class. This does not affect the state needed to define the objects state, but it provides a means for the DXF file parsers to direct the group codes to the corresponding application software. For example, an object that has data from different derived classes would be represented as follows:

168

Appendix B Advanced DXF Issues

999 FOOGRANDCHILD, defined by class AcDbSonOfSonOfFoo, which 999 is derived from AcDbSonOfFoo 0 FOOGRANDCHILD 5 C2 100 AcDbFoo 999 Uses 10/20/30 group codes 10 1.1 20 2.3 30 7.3 100 AcDbSonOfFoo 999 Also uses 10/20/30 group codes, for a different purpose 10 1.1 20 2.3 30 7.3 100 AcDbSonOfSonOfFoo 999 Also uses 10/20/30 group codes, for yet another purpose 10 13.2 20 23.1 30 31.2 999 Now for the Xdata 1001 APP_1 1070 45 1001 APP_2 1004 18A5B3EF2C199A

Subclass Markers

169

Extension Dictionary and Persistent Reactors


The extension dictionary is an optional sequence that stores the handle of a dictionary object that belongs to the current object, which in turn may contain entries. This facility allows attachment of arbitrary database objects to any database object. Any object or entity may have this section. Persistent reactors are an optional sequence that stores object handles of objects registering themselves as reactors on the current object. Any object or entity may have this section.

Extended Data
Extended data (xdata) is created by AutoLISP or ObjectARX applications. If an entity contains extended data, it follows the entitys normal definition data. The group codes 1000 through 1071 describe extended data. The following is an example of an entity containing extended data in DXF format. Normal entity definition data:
0 INSERT 5 F11 100 AcDbEntity 8 TOP 100 AcDbBlockReference 2 BLOCK_A 10 0.0 20 0.0 30 0.0

Extended entity definition data:

170

Appendix B Advanced DXF Issues

1001 AME_SOL 1002 { 1070 0 1071 1.95059E+06 1070 519 1010 2.54717 1020 2.122642 1030 2.049201 1005 ECD 1005 EE9 1005 0 1040 0.0 1040 1.0 1000 MILD_STEEL

The group code 1001 indicates the beginning of extended data. In contrast to normal entity data, with extended data the same group code can appear multiple times, and order is important. Extended data are grouped by registered application name. Each registered applications group begins with a 1001 group code with the application name as the string value. Registered application names correspond to APPID symbol table entries. An application can use as many APPID names as needed. APPID names are permanent, although they can be purged if they arent currently used in the drawing. Each APPID name can have no more than one data group attached to each entity. Within an applications group, the sequence of extended data groups and their meaning is defined by the application. The extended data group codes are listed in the following table. Extended data group codes and descriptions
Entity name String Group code 1000 Description Strings in extended data can be up to 255 bytes long (with the 256th byte reserved for the null character)

Extended Data

171

Extended data group codes and descriptions (continued)


Entity name Application name Group code 1001 also a string value Description Application names can be up to 31 bytes long (the 32nd byte is reserved for the null character). NOTE Do not add a 1001 group into your extended data because AutoCAD assumes it is the beginning of a new application extended data group An extended data control string can be either {or }. These braces enable applications to organize their data by subdividing the data into lists. The left brace begins a list, and the right brace terminates the most recent list. Lists can be nested. When AutoCAD reads the extended data for a particular application, it checks to ensure that braces are balanced Name of the layer associated with the extended data Binary data is organized into variable-length chunks. The maximum length of each chunk is 127 bytes. In ASCII DXF files, binary data is represented as a string of hexadecimal digits, two per binary byte Handles of entities in the drawing database NOTE When a drawing with handles and extended data handles is imported into another drawing using INSERT, INSERT *, XREF Bind, XBIND, or partial OPEN, the extended data handles are translated in the same manner as their corresponding entity handles, thus maintaining their binding. This is also done in the EXPLODE block operation or for any other AutoCAD operation. When AUDIT detects an extended data handle that doesnt match the handle of an entity in the drawing file, it is considered an error. If AUDIT is fixing entities, it sets the handle to 0 Three real values, in the order X, Y, Z. They can be used as a point or vector record. AutoCAD never alters their value Unlike a simple 3D point, the world space coordinates are moved, scaled, rotated, and mirrored along with the parent entity to which the extended data belongs. The world space position is also stretched when the STRETCH command is applied to the parent entity and this point lies within the select window Also a 3D point that is scaled, rotated, and mirrored along with the parent (but is not moved or stretched) Also a 3D point that is rotated and mirrored along with the parent (but is not moved, scaled, or stretched) A real value A real value that is scaled along with the parent entity

Control string

1002

Layer name Binary data

1003 1004

Database handle

1005

3 reals

1010, 1020, 1030

World space position 1011, 1021, 1031

World space displacement World direction

1012, 1022, 1032 1013, 1023, 1033 1040 1041

Real Distance

172

Appendix B Advanced DXF Issues

Extended data group codes and descriptions (continued)


Entity name Scale factor Group code 1042 Description Also a real value that is scaled along with the parent. The difference between a distance and a scale factor is application-defined A 16-bit integer (signed or unsigned) A 32-bit signed (long) integer

Integer Long

1070 1071

Object Coordinate Systems (OCS)


To save space in the drawing database (and in the DXF file), the points associated with each entity are expressed in terms of the entitys own object coordinate system (OCS). The OCS was referred to as ECS in previous releases of AutoCAD. With OCS, the only additional information needed to describe the entitys position in 3D space is the 3D vector describing the Z axis of the OCS, and the elevation value. For a given Z axis (or extrusion) direction, there are an infinite number of coordinate systems, defined by translating the origin in 3D space and by rotating the X and Y axes around the Z axis. However, for the same Z axis direction, there is only one OCS. It has the following properties:
s s

Its origin coincides with the WCS origin. The orientation of the X and Y axes within the XY plane are calculated in an arbitrary but consistent manner. AutoCAD performs this calculation using the arbitrary axis algorithm (see Arbitrary Axis Algorithm on page 175).

For some entities, the OCS is equivalent to the WCS and all points (DXF groups 1037) are expressed in world coordinates. See the following table. Coordinate systems associated with an entity type
Entities Notes

3D entities such as line, point, These entities do not lie in a particular plane. All points 3dface, 3D polyline, 3D vertex, are expressed in world coordinates. Of these entities, 3D mesh, 3D mesh vertex only lines and points can be extruded. Their extrusion direction can differ from the world Z axis

Object Coordinate Systems (OCS)

173

Coordinate systems associated with an entity type (continued)


Entities 2D entities such as circle, arc, solid, trace, text, attrib, attdef, shape, insert, 2D polyline, 2D vertex, lwpolyline, hatch, image Dimension Notes These entities are planar in nature. All points are expressed in object coordinates. All of these entities can be extruded. Their extrusion direction can differ from the world Z axis Some of a dimensions points are expressed in WCS and some in OCS Expressed in world coordinates

Viewport

Once AutoCAD has established the OCS for a given entity, the OCS works as follows: The elevation value stored with an entity indicates how far to shift the XY plane along the Z axis (from the WCS origin) to make it coincide with the plane that contains the entity. How much of this is the user-defined elevation is unimportant. Any 2D points entered through the UCS are transformed into the corresponding 2D points in the OCS, which is shifted and rotated with respect to the UCS. These are a few ramifications of this process:
s s

You cannot reliably find out what UCS was in effect when an entity was acquired. When you enter the XY coordinates of an entity in a given UCS and then do a SAVEAS, you probably wont recognize those XY coordinates in the DXF file. You must know the method by which AutoCAD calculates the X and Y axes in order to work with these values. The elevation value stored with an entity and output in DXF files is a sum of the Z-coordinate difference between the UCS XY plane and the OCS XY plane, and the elevation value that the user specified at the time the entity was drawn.

174

Appendix B Advanced DXF Issues

Arbitrary Axis Algorithm


The arbitrary axis algorithm is used by AutoCAD internally to implement the arbitrary but consistent generation of object coordinate systems for all entities which use object coordinates. Given a unit-length vector to be used as the Z axis of a coordinate system, the arbitrary axis algorithm generates a corresponding X axis for the coordinate system. The Y axis follows by application of the right-hand rule. The method is to examine the given Z axis (also called the normal vector) and see if it is close to the positive or negative world Z axis. If it is, cross the world Y axis with the given Z axis to arrive at the arbitrary X axis. If not, cross the world Z axis with the given Z axis to arrive at the arbitrary X axis. The boundary at which the decision is made was chosen to be both inexpensive to calculate and completely portable across machines. This is achieved by having a sort of square polar cap, the bounds of which is 1/64, which is precisely specifiable in six decimal-fraction digits and in six binary-fraction bits. The algorithm does the following. (All vectors are assumed to be in 3D space and specified in the world coordinate system.)
Let the given normal vector be called N. Let the world Y axis be called Wy, which is always (0,1,0). Let the world Z axis be called Wz, which is always (0,0,1).

Here we are looking for the arbitrary X and Y axes to go with the normal N. They will be called Ax and Ay. N could also be called Az (the arbitrary Z axis) as follows:
If (abs (Nx) < 1/64) and (abs (Ny) < 1/64) then Ax = Wy X N (where X is the cross-product operator). Otherwise, Ax = Wz X N. Scale Ax to unit length.

The method of getting the Ay vector is:


Ay = N X Ax. Scale Ay to unit length.

Arbitrary Axis Algorithm

175

176

Index

*Model_Space block definition, 57 *Paper_Space block definition, 57 2D entities, coordinate systems associated with, 174 3D entities, coordinate systems associated with, 173 3dface group codes, 62 3dsolid group codes , 63

A
acad_proxy_entity group codes, 63 ACAD_PROXY_OBJECT group codes, 117 ACADMAINTVER DXF system variable, 16 ACADVER DXF system variable, 16 ACDBDICTIONARYWDFLT group codes, 118 ACDBPLACEHOLDER group codes , 119 aligned dimension group codes , 71 ANGBASE DXF system variable , 16 ANGDIR DXF system variable, 16 angular dimension group codes , 74 anonymous blocks , 56 APPID group codes , 38 xdata groupings and, 171 application-defined object types, 116 arbitrary axis algorithm , 175 arbitrary handles , 166 arc edge data for hatch entities, 81 arc group codes , 64 ASCII control characters in DXF files, 147 ASCII DXF files about, 145 vs. binary DXF files, 158 BLOCKS section (example), 152 CLASSES section (example), 148

control character handling, 147 ENTITIES section (example), 153 HEADER section (example), 148 maximum file string length , 147 OBJECTS section (example), 153 reading (example), 154 sections of, 146 structure of, 146 TABLES section (example), 149 writing (example), 156 attdef group codes, 65 ATTMODE DXF system variable, 16 attrib group codes , 66 AUNITS DXF system variable, 16 AUPREC DXF system variable, 16 AutoLISP arbitrary handles and, 167 entnext function output for ole2frame entity (example), 96 group code 1005 xdata items and, 168 handent function, 168 reference handles and, 166 , 167

B
binary DXF files, 145 , 158 block definitions about, 56 Model_Space and Paper_Space, 57 UCS/WCS and, 57 block group codes , 56 block reference (insert) group codes , 85 block table handles , 56 BLOCK_RECORD group codes , 39 BLOCKS section

177

about, 55 , 147 example of, 152 group codes in, 56 and writing a DXF file, 156 blocks, anonymous, 56 body group codes , 68 boundary path data for hatch entities, 80

C
C++ class names, default class values , 33 CECOLOR DXF system variable, 16 CELTSCALE DXF system variable , 16 CELTYPE DXF system variable, 16 CELWEIGHT DXF system variable, 16 CEPSNTYPE DXF system variable, 16 CHAMFERA DXF system variable, 16 CHAMFERB DXF system variable , 16 CHAMFERC DXF system variable , 17 CHAMFERD DXF system variable, 17 circle group codes, 69 CLASSES section about, 31 , 146 default class values by DXF record name and C++ class name, 33 group codes in, 32 CLAYER DXF system variable, 17 CMLJUST DXF system variable, 17 CMLSCALE DXF system variable, 17 CMLSTYLE DXF system variable, 17 common entity group codes, 60 control character handling, 147 conventions used in this reference, 6 coordinate systems associated with entity types, 173 CPSNID DXF system variable, 16

D
database objects, 166 default class values by DXF record name and C++ class name, 33 deleted items in symbol tables, 36 diameter dimension group codes , 73 dictionaries, named object , 116 DICTIONARY group codes , 120 DICTIONARYVAR group codes , 121, 122 DIMADEC DXF system variable, 17 DIMALT DXF system variable, 17 DIMALTD DXF system variable, 17 DIMALTF DXF system variable, 17 DIMALTRND DXF system variable, 17 DIMALTTD DXF system variable, 17 DIMALTTZ DXF system variable, 17 DIMALTU DXF system variable, 17 DIMALTZ DXF system variable, 17 DIMAPOST DXF system variable, 17

DIMASO DXF system variable, 18 DIMASZ DXF system variable, 18 DIMATFIT DXF system variable , 18 DIMAUNIT DXF system variable, 18 DIMAZIN DXF system variable, 18 DIMBLK DXF system variable, 18 DIMBLK1 DXF system variable, 18 DIMBLK2 DXF system variable, 18 DIMCEN DXF system variable , 18 DIMCLRD DXF system variable, 18 DIMCLRE DXF system variable, 18 DIMCLRT DXF system variable , 18 DIMDEC DXF system variable, 18 DIMDLE DXF system variable, 18 DIMDLI DXF system variable, 18 DIMDSEP DXF system variable, 19 dimension entities, coordinate systems associated with, 174 dimension group codes , 69 aligned, 71 angular, 74 common, 69 diameter , 73 linear , 72 ordinate, 75 radial, 73 rotated, 72 dimension style overrides , 76 DIMEXE DXF system variable, 19 DIMEXO DXF system variable, 19 DIMFRAC DXF system variable, 19 DIMGAP DXF system variable , 19 DIMJUST DXF system variable , 19 DIMLDRBLK DXF system variable, 19 DIMLFAC DXF system variable, 19 DIMLIM DXF system variable, 19 DIMLUNIT DXF system variable, 19 DIMLWD DXF system variable , 19 DIMLWE DXF system variable, 19 DIMPOST DXF system variable, 19 DIMRND DXF system variable, 19 DIMSAH DXF system variable, 19 DIMSCALE DXF system variable, 20 DIMSD1 DXF system variable , 20 DIMSD2 DXF system variable , 20 DIMSE1 DXF system variable, 20 DIMSE2 DXF system variable, 20 DIMSHO DXF system variable , 20 DIMSOXD DXF system variable , 20 DIMSTYLE table handle code, 36 DIMSTYLE DXF system variable, 20 DIMSTYLE group codes , 40 DIMSTYLE table handle code , 36 DIMTAD DXF system variable, 20 DIMTDEC DXF system variable, 20 DIMTFAC DXF system variable, 20

178

Index

DIMTIH DXF system variable, 20 DIMTIX DXF system variable, 20 DIMTM DXF system variable, 20 DIMTMOVE DXF system variable, 20 DIMTOFL DXF system variable, 20 DIMTOH DXF system variable, 20 DIMTOL DXF system variable, 20 DIMTOLJ DXF system variable, 20 DIMTP DXF system variable, 21 DIMTSZ DXF system variable, 21 DIMTVP DXF system variable, 21 DIMTXSTY DXF system variable, 21 DIMTXT DXF system variable, 21 DIMTZIN DXF system variable, 21 DIMUPT DXF system variable, 21 DIMZIN DXF system variable , 21 DISPSILH DXF system variable, 21 drawing interchange file formats ASCII DXF , 145 , 146 binary DXF , 145, 158 Slide (SLD), 159 Slide Library (SLB), 163 DWGCODEPAGE DXF system variable, 21 DXF conventions group code ranges, 7 group codes in numerical order, 9 file parsers, subclass markers and, 168 files. See ASCII DXF files; binary DXF files format about, 5 interface programs, writing (example), 154 record names, default class values , 33 system variables , 16 DXFIN considerations for writing DXF files , 157

EXTMIN DXF system variable, 21 EXTNAMES DXF system variable , 22 extrusion direction, OCS properties for, 173

F
FASTZ revised VPORT header variable, 28 filing a stream of group data, subclass markers and, 168 FILLETRAD DXF system variable, 22 FILLMODE DXF system variable, 22 FINGERPRINTGUID DXF system variable , 22

G
getvar AutoLISP function, 148 graphical object group codes. See names of specific objects GRIDMODE revised VPORT header variable, 28 GRIDUNIT revised VPORT header variable, 28 group codes about, 146 arbitrary handle range, 166 ASCII DXF files and, 147 binary DXF files and, 158 for entities (graphical objects), 60 examples of, 148 formatting conventions for, 6 in numerical order, 9 objects/entities and, 6 ranges of, 7 reference handle ranges , 166 for xdata , 171 group data, subclass markers and, 168 GROUP group codes , 124

E
ECS. See object coordinate system ELEVATION DXF system variable, 21 elevation value for entity positioning, 173 ellipse edge data for hatch entities, 82 ellipse group codes , 76 elliptical arc definition , 77 endblk group codes, 58 ENDCAPS DXF system variable, 21 entities block, 56 coordinate systems associated with, 173 endblk, 56 entity group codes vs. object codes, 6 group codes listed in numerical order, 9 ENTITIES section about, 59 , 147 and writing a DXF file, 156 extension dictionary, 170 EXTMAX DXF system variable, 21

H
handent functions (AutoLISP), 168 handles about, 166 arbitrary, 166 of dictionary objects , 170 reference, 166 HANDSEED DXF system variable, 22 hard references vs. soft references , 167 hard-owner handles, 166 hard-pointer handles , 166 hatch group codes , 78 hatch pattern data, 83 HEADER section about, 15 , 146 example of, 148 group codes for revised VPORT variables , 27 group codes for saved DXF system variables, 16

Index

179

time/date variables, handling of, 28 and writing a DXF file, 156 HYPERLINKBASE DXF system variable, 22

N
named object dictionary, 116 nongraphical object group codes. See names of specific objects normal vector, arbitrary axis algorithm and, 175 numerical order group codes, 9

I
IDBUFFER group codes , 125 image group codes , 83 IMAGEDEF group codes, 125 IMAGEDEF_REACTOR group codes , 126 inheritance levels for filer members, subclass markers and, 168 INSBASE DXF system variable , 22 INSERT command ASCII control character handling and, 147 binary DXF files and, 159 insert group codes , 85 INSUNITS DXF system variable, 22

O
object coordinate system (OCS), 173 arbitrary axis algorithm and, 175 OBJECT_PTR group codes , 132 ObjectARX group code 1005 xdata items and, 168 reference handles and, 166 , 167 ObjectARX, reference handles and, 166 objects object group codes vs. entity codes , 6 ownership of, 116 OBJECTS section about, 115, 147 common group codes , 116 ole2frame entities, AutoLISP entnext function output (example), 96 ole2frame group codes , 94 DXF output (example), 95 oleframe group codes, 93 OPEN command ASCII control character handling and, 147 binary DXF files and, 159 ordinate dimension group codes, 75 ORTHOMODE DXF system variable, 23 ownership pointers to extension dictionaries , 166 ownership references vs. pointer references , 167

J
JOINSTYLE DXF system variable , 22

L
LAYER group codes , 44 LAYER_FILTER group codes , 128 LAYER_INDEX group codes , 127 LAYOUT group codes, 128 leader group codes , 86 LIMCHECK DXF system variable, 22 LIMMAX DXF system variable, 22 LIMMIN DXF system variable, 22 line edge data for hatch entities, 81 line group codes , 88 linear dimension group codes , 72 LTSCALE DXF system variable , 22 LTYPE group codes , 45 LUNITS DXF system variable, 22 LUPREC DXF system variable, 22 LWDISPLAY DXF system variable, 23 lwpolyline group codes , 88

P
Paper_Space block definition, 57 pattern data for hatch entities, 83 PDMODE DXF system variable, 23 PDSIZE DXF system variable, 23 PELEVATION DXF system variable, 23 persistent inter-object reference handles , 166 persistent reactor tables , 166 , 170 PEXTMAX DXF system variable, 23 PEXTMIN DXF system variable, 23 PFACE command considerations , 98 PINSBASE DXF system variable, 23 PLIMCHECK DXF system variable, 23 PLIMMAX DXF system variable, 23 PLIMMIN DXF system variable, 23 PLINEGEN DXF system variable, 23 PLINEWID DXF system variable, 23, 24 PLOTSETTINGS group codes , 133 point group codes , 96

M
MAXACTVP DXF system variable, 23 MEASUREMENT DXF system variable , 23 MENU DXF system variable, 23 MIRRTEXT DXF system variable, 23 mline group codes , 89 MLINESTYLE group codes , 131 Model_Space block definition, 57 MSLIDE/VSLIDE commands , 159 mtext group codes , 92

180

Index

pointer references vs. ownership references , 167 polyface meshes in DXF, 98 polyline boundary data for hatch entities, 81 polyline group codes , 97 polyface meshes and, 98 PROXYGRAPHICS DXF system variable, 23 PSLTSCALE DXF system variable, 23 PSVPSCALE DXF system variable, 24 PUCSBASE DXF system variable, 24 PUCSNAME DXF system variable, 24 PUCSORG DXF system variable , 24 PUCSORGBACK DXF system variable, 24 PUCSORGBOTTOM DXF system variable, 24 PUCSORGFRONT DXF system variable , 24 PUCSORGLEFT DXF system variable, 24 PUCSORGRIGHT DXF system variable, 24 PUCSORGTOP DXF system variable , 24 PUCSORTHOREF DXF system variable, 24 PUCSORTHOVIEW DXF system variable , 24 PUCSXDIR DXF system variable, 24 PUCSYDIR DXF system variable, 24

Q
QTEXTMODE DXF system variable, 25

R
radial dimension group codes, 73 ranges of group codes , 7 RASTERVARIABLES group codes , 135 ray group codes, 99 reading a DXF file (example), 154 reference handles hard vs. soft, 167 pointer vs. ownership, 167 types of, 166 REGENMODE DXF system variable, 25 region group codes, 99 rotated dimension group codes , 72

S
SAVE command Binary option, 158 Select Objects option, 147 SAVEAS command ASCII control character handling and, 147 binary DXF files and, 159 Binary option, 158 Select Objects option, 147 sequend group codes , 100 SHADEDGE DXF system variable, 25 SHADEDIF DXF system variable, 25 shape group codes , 100 SKETCHINC DXF system variable , 25

SKPOLY DXF system variable , 25 slide (SLD) files about, 159 data record types, 160 header format, 159 hex dump of (example), 161 old-format header , 162 vectors and, 160 slide library (SLB) file format, 163 SNAPANG revised VPORT header variable, 28 SNAPBASE revised VPORT header variable, 28 SNAPISOPAIR revised VPORT header variable, 28 SNAPMODE revised VPORT header variable, 28 SNAPSTYLE revised VPORT header variable, 28 SNAPUNIT revised VPORT header variable, 28 soft references vs. hard references , 167 soft-owner handles, 166 soft-pointer handles , 166, 167 solid group codes , 101 SORTENTSTABLE group codes , 138 SPATIAL_FILTER group codes , 137 SPATIAL_INDEX group codes, 136 SPLFRAME DXF system variable , 25 spline edge data for hatch entities, 82 spline group codes , 102 SPLINESEGS DXF system variable, 25 SPLINETYPE DXF system variable , 25 STYLE group codes , 46 subclass markers , 168 SURFTAB1 DXF system variable, 25 SURFTAB2 DXF system variable, 25 SURFTYPE DXF system variable, 25 SURFU DXF system variable , 25 SURFV DXF system variable , 25 symbol table entries common group codes , 37 structure of, 36 symbol tables common group codes , 36 deleted items and, 36 DIMSTYLE handle, 36 handles and, 166 identifying, 36 structure of, 36 system variables, saved in DXF files , 16

T
TABLES section about, 35 , 146 example of, 149 symbol table common group codes, 36 symbol table structure, 36 and writing a DXF file, 156 tagged data, 5 TDCREATE DXF system variable, 25 TDINDWG DXF system variable, 25

Index

181

TDUCREATE DXF system variable, 25 TDUPDATE DXF system variable, 25 TDUSRTIMER DXF system variable, 25 TDUUPDATE DXF system variable , 26 text group codes , 103 TEXTSIZE DXF system variable, 26 TEXTSTYLE DXF system variable , 26 THICKNESS DXF system variable, 26 THUMBNAIL section about, 147 THUMBNAILIMAGE group codes , 144 THUMBNAILIMAGE section about, 143 TILEMODE DXF system variable, 26 time/date variables, handling of, 28 tolerance group codes, 105 TRACE DXF system variable, 26 trace group codes , 106 TREEDEPTH DXF system variable, 26

vertex group codes , 107 VIEW group codes, 49 VIEWCTR revised VPORT header variable, 28 VIEWDIR revised VPORT header variable, 28 viewport entities coordinate systems associated with, 174 viewport group codes , 109 VIEWSIZE revised VPORT header variable, 28 VISRETAIN DXF system variable, 27 Visual Basic programs (examples) for reading a DXF file, 154 for writing a DXF file, 157 VPORT group codes , 51 VPORT header variables, revised, 27 VSLIDE/MSLIDE commands , 159

W
world coordinate system (WCS), 173 WORLDVIEW DXF system variable, 27 writing a DXF file (example), 156

U
UCS group codes, 47 UCSBASE DXF system variable , 26 UCSNAME DXF system variable, 26 UCSORG DXF system variable, 26 UCSORGBACK DXF system variable, 26 UCSORGBOTTOM DXF system variable, 26 UCSORGFRONT DXF system variable, 26 UCSORGLEFT DXF system variable, 26 UCSORGRIGHT DXF system variable, 26 UCSORGTOP DXF system variable, 26 UCSORTHOREF DXF system variable, 26 UCSORTHOVIEW DXF system variable, 27 UCSXDIR DXF system variable, 27 UCSYDIR DXF system variable, 27 UNITMODE DXF system variable, 27 user coordinate system (UCS), 174 USERI1-5 DXF system variable, 27 USERR1-5 DXF system variable, 27 USRTIMER DXF system variable, 27

X
X and Y axes orientation calculations , 173, 174, 175 X axis, arbitrary axis algorithm and, 175 xdata and dimension entities, 76 sample entity containing (DXF format), 170 xdata group codes , 171 binary DXF group codes , 158 XEDIT DXF system variable, 27 xline group codes , 113 XRECORD group codes , 140 XY coordinates, working with, 174

Y
Y axis, arbitrary axis algorithm and, 175

Z V
VBA_PROJECT group codes , 139 vectors, in slide files, 160 VERSIONGUID DXF system variable, 27 Z axis arbitrary axis algorithm and, 175 OCS properties for , 173

182

Index

You might also like