Everything in a drawing is stored as an object: entities such as lines and text, table entries such as layers, dictionaries, and non-graphical objects. In R13 to R2000 the objects lie between the classes and the object map; from R2004 they are in the AcDb:AcDbObjects section. They may appear in any order; the object map gives each handle’s position. This page follows chapters 20 and 28 of the Open Design Alliance’s Open Design Specification for .dwg files, version 5.4.1. Field tables give the name, the data type, the matching DXF group code where there is one, and notes.
- Reading objects
- Common object format, string stream, common entity format, R13 and R14 entity flags
- Object type numbers
- Common entity data, common entity handle data, worked example
- Entities: TEXT, ATTRIB, ATTDEF, BLOCK, ENDBLK, SEQEND, INSERT, MINSERT, VERTEX, 2D POLYLINE, 3D POLYLINE, ARC, CIRCLE, LINE, DIMENSION, POINT, 3DFACE, PFACE and MESH polylines, SOLID and TRACE, SHAPE, VIEWPORT, ELLIPSE, SPLINE, REGION, 3DSOLID, BODY, RAY and XLINE, MTEXT, TOLERANCE, MLINE, LWPOLYLINE
- Objects: DICTIONARY, control objects, BLOCK HEADER, LAYER, STYLE (SHAPEFILE), LTYPE, APPID, GROUP, DICTIONARYVAR, XRECORD
- Objects described in the specification but not here
- Extended entity data, proxy entity graphics
Reading objects
Not every object in a file is used. Every used object can be reached by following handle references from the header variables, so the specification recommends reading the header and then following every reference. Files occasionally hold two APPID objects with the same name, only one of them used, and some files hold table records with duplicate names, which a reader should rename. One way to load objects is through the object map, which loads each object exactly once; the ODA’s toolkit loads the control objects first and then the objects they contain.
Every object starts on a byte boundary with its size as a modular short, and ends with a 2-byte CRC on a byte boundary; between them the data is a bit stream. The CRC covers the size bytes.
Common object format
Non-entity objects have this general layout:
| Versions | Type | DXF | Meaning |
|---|---|---|---|
| All | MS | – | Size of the object in bytes, not counting the CRC |
| R2010+ | MC | – | Size of the handle stream in bits, unsigned (0x40 is not a sign here), including the padding bits at its end |
| All | OT | – | Object type |
| R2000–R2007 | RL | – | Size of the object data in bits, the “endbit” of the data before the handles |
| All | H | 5 | The object’s handle |
| All | BS | – | Size of extended object data, if any |
| All | X | – | Extended object data, if any |
| R13–R14 | RL | – | Size of the object data in bits |
| All | BL | – | Number of persistent reactors |
| R2004+ | B | – | 1 if no extension dictionary (XDictionary) handle is stored |
| R2013+ | B | – | The object has binary data in the data store |
| All | X | – | Object data, varying by type |
| R2007+ | X | – | String data (optional) |
| R2007+ | B | – | String stream present (the last bit before the handles; below) |
| All | H | – | Handle stream: parent (soft pointer); the reactors (soft pointers); the extension dictionary (hard owner) if present; then the object’s own handles |
| All | B* | – | Padding bits to the next byte boundary |
| All | RS | – | CRC, including the size bytes |
String stream (R2007 and later)
All Unicode strings of an object are kept together in a string stream at the end of its data, though the field tables list them among the other fields. To find it:
- Read the bit at endbit − 1 (the last bit before the handles). If it is 0, there is no string stream.
- If it is 1, move endbit back 16 bytes and read a short at endbit − 128 bits: strDataSize.
- If strDataSize has 0x8000 set, move endbit back another
16 bytes, clear 0x8000, read the short at the new position as
hiSize, and set strDataSize to
strDataSize | (hiSize << 15). - Move endbit back by strDataSize; that bit position is the start of the string stream.
The header variables and classes sections use the same arrangement from R2007.
Common entity format
Entities have the same layout as objects with some standard items added:
| Versions | Type | Meaning |
|---|---|---|
| All | MS | Size of the object, not counting the CRC |
| R2010+ | MC | Size of the handle stream in bits (unsigned) |
| All | OT | Object type |
| R2000+ | RL | Size of the object data in bits |
| All | H | The object’s handle |
| All | BS, X | Size of extended data, and the data |
| All | B | Graphic image present |
| R13–R2007 | RL | If present: size of the graphic image in bytes |
| R2010+ | BLL | If present: size of the graphic image in bytes |
| All | X | If present: the graphic image (proxy graphics) |
| R13–R14 | RL | Size of the object data in bits |
| R13–R14 | 6 bits | Flags |
| R13–R14 | 6 bits | Common parameters |
| R2000+ | B | 0 if the previous and next links are present; 1 if both are defaults (one back and one forward) |
| R2000+ | ENC | Entity colour |
| R2000+ | BD | Linetype scale |
| R2000+ | BB | Linetype flags: 00 by layer, 01 by block, 10 continuous, 11 a linetype handle is in the handle stream |
| R2000+ | BB | Plot style flags: 00 by layer, 01 by block, 10 continuous, 11 a plot style handle is in the handle stream |
| R2007+ | BB | Material flags: 00 by layer, 01 by block, 10 global material (uncertain in the specification), 11 a material handle is in the handle stream |
| R2007+ | RC | Shadow flags |
| R2010+ | B, B, B | Has full visual style; has face visual style; has edge visual style |
| All | BS | Invisible flag: bit 0, 0 visible, 1 invisible |
| R2000+ | RC | Entity lineweight flag |
| All | X | Object data, by type |
| All | X | Handles |
| All | B* | Padding bits to the next byte boundary |
| All | RS | CRC |
R13 and R14 entity flags
The six flag bits, FEDCBA, say which handle references are present:
| Bits | Meaning |
|---|---|
| FE | Entity mode. 00: the owner handle reference is present (VERTEX, ATTRIB, SEQEND, BLOCK, ENDBLK, and entities in block definitions other than *MODEL_SPACE and *PAPER_SPACE); 01: paper space entity with no owner reference; 10: model space entity with no owner reference; 11: not used |
| DC | Number of reactors, as a bitshort (seen from R14, and in R13 files saved by R14) |
| B | 0 if a linetype reference is present; 1 if not (by layer) |
| A | 0 if the previous and next links are present; 1 if both are defaults |
The six common parameter bits, CCSSII, are the colour (a bitshort), the linetype scale (a bitdouble) and the invisibility (a bitshort, bit 0 set when invisible). Some entity parameters are always raw even where a bit code could be used, such as the 10 and 11 points of TEXT.
Object type numbers
These types have fixed numbers:
| Number | Type | Number | Type |
|---|---|---|---|
| 0x00 | UNUSED | 0x28 | RAY |
| 0x01 | TEXT | 0x29 | XLINE |
| 0x02 | ATTRIB | 0x2A | DICTIONARY |
| 0x03 | ATTDEF | 0x2B | OLEFRAME |
| 0x04 | BLOCK | 0x2C | MTEXT |
| 0x05 | ENDBLK | 0x2D | LEADER |
| 0x06 | SEQEND | 0x2E | TOLERANCE |
| 0x07 | INSERT | 0x2F | MLINE |
| 0x08 | MINSERT | 0x30 | BLOCK CONTROL OBJ |
| 0x09 | (none listed) | 0x31 | BLOCK HEADER |
| 0x0A | VERTEX (2D) | 0x32 | LAYER CONTROL OBJ |
| 0x0B | VERTEX (3D) | 0x33 | LAYER |
| 0x0C | VERTEX (MESH) | 0x34 | STYLE CONTROL OBJ |
| 0x0D | VERTEX (PFACE) | 0x35 | STYLE |
| 0x0E | VERTEX (PFACE FACE) | 0x36 | (none listed) |
| 0x0F | POLYLINE (2D) | 0x37 | (none listed) |
| 0x10 | POLYLINE (3D) | 0x38 | LTYPE CONTROL OBJ |
| 0x11 | ARC | 0x39 | LTYPE |
| 0x12 | CIRCLE | 0x3A | (none listed) |
| 0x13 | LINE | 0x3B | (none listed) |
| 0x14 | DIMENSION (ORDINATE) | 0x3C | VIEW CONTROL OBJ |
| 0x15 | DIMENSION (LINEAR) | 0x3D | VIEW |
| 0x16 | DIMENSION (ALIGNED) | 0x3E | UCS CONTROL OBJ |
| 0x17 | DIMENSION (ANG 3-Pt) | 0x3F | UCS |
| 0x18 | DIMENSION (ANG 2-Ln) | 0x40 | VPORT CONTROL OBJ |
| 0x19 | DIMENSION (RADIUS) | 0x41 | VPORT |
| 0x1A | DIMENSION (DIAMETER) | 0x42 | APPID CONTROL OBJ |
| 0x1B | POINT | 0x43 | APPID |
| 0x1C | 3DFACE | 0x44 | DIMSTYLE CONTROL OBJ |
| 0x1D | POLYLINE (PFACE) | 0x45 | DIMSTYLE |
| 0x1E | POLYLINE (MESH) | 0x46 | VP ENT HDR CTRL OBJ |
| 0x1F | SOLID | 0x47 | VP ENT HDR |
| 0x20 | TRACE | 0x48 | GROUP |
| 0x21 | SHAPE | 0x49 | MLINESTYLE |
| 0x22 | VIEWPORT | 0x4A | OLE2FRAME |
| 0x23 | ELLIPSE | 0x4B | (DUMMY) |
| 0x24 | SPLINE | 0x4C | LONG_TRANSACTION |
| 0x25 | REGION | 0x4D | LWPOLYLINE |
| 0x26 | 3DSOLID | 0x4E | HATCH |
| 0x27 | BODY | 0x4F | XRECORD |
| 0x50 | ACDBPLACEHOLDER | ||
| 0x51 | VBA_PROJECT | ||
| 0x52 | LAYOUT | ||
| 0x1F2 | ACAD_PROXY_ENTITY | ||
| 0x1F3 | ACAD_PROXY_OBJECT |
Other types have numbers that vary by drawing. Subtract 500 from the type to get an index into the class list: type 501 is the second class, and its DXF name says what the object is. The specification lists these as variable: ACAD_TABLE, CELLSTYLEMAP, DBCOLOR, DICTIONARYVAR, DICTIONARYWDFLT, FIELD, GROUP, HATCH, IDBUFFER, IMAGE, IMAGEDEF, IMAGEDEFREACTOR, LAYER_INDEX, LAYOUT, LWPLINE, MATERIAL, MLEADER, MLEADERSTYLE, OLE2FRAME, PLACEHOLDER, PLOTSETTINGS, RASTERVARIABLES, SCALE, SORTENTSTABLE, SPATIAL_FILTER, SPATIAL_INDEX, TABLEGEOMETRY, TABLESTYLES, VBA_PROJECT, VISUALSTYLE, WIPEOUTVARIABLE and XRECORD. Some of these (GROUP, HATCH, LAYOUT, LWPLINE, OLE2FRAME, VBA_PROJECT, XRECORD) also appear with fixed numbers above.
Common entity data
Every entity starts with this data, written “Common Entity Data” in the field tables below:
| Field | Type | DXF | Versions and notes |
|---|---|---|---|
| Length | MS | – | Entity length, not counting itself or the CRC |
| Type | BS (OT from R2010) | 0 | Type code |
| Object size | RL | – | R2000+: size in bits, not including the handles |
| Handle | H | 5 | Code 0, then the length and handle bytes |
| EED size | BS | – | Size of extended entity data |
| EED | X | −3 | Extended entity data |
| Graphic present | B | – | 1 if a graphic follows |
| Graphics | X | – | Proxy graphics, if present |
| Object size | RL | – | R13–R14: size in bits, not including the handles |
| Entity mode | BB | – | As FE in the R13 flags |
| Number of reactors | BL | – | Persistent reactors attached |
| XDic missing | B | – | R2004+: 1 if no extension dictionary handle is stored |
| Has DS binary data | B | – | R2013+: binary data in the data store |
| Is by-layer linetype | B | – | R13–R14: 1 if by layer |
| No links | B | – | 1 if the previous and next links are the defaults; always 1 from R2004 (links are not used) |
| Colour | CMC | 62 | – |
| Linetype scale | BD | 48 | – |
| Linetype flags | BB | – | R2000+: 00 by layer, 01 by block, 10 continuous, 11 handle at the end of the object |
| Plot style flags | BB | – | R2000+: 00 by layer, 01 by block, 11 handle at the end |
| Material flags | BB | – | R2007+: 00 by layer, 01 by block, 11 handle at the end |
| Shadow flags | RC | – | R2007+ |
| Invisibility | BS | 60 | – |
| Lineweight | RC | 370 | R2000+ |
Common entity handle data
In the handle stream of every entity (“Common Entity Handle Data”):
| Versions | DXF | Handle |
|---|---|---|
| All | – | Owner (soft pointer), when the entity mode says it is present |
| All | – | Reactors (soft pointers) |
| All | – | Extension dictionary (hard owner) |
| R13–R14 | 8 | LAYER (hard pointer) |
| R13–R14 | 6 | LTYPE (hard pointer), when “is by-layer linetype” is 0 |
| R13–R2000 | – | Previous and next entity (relative soft pointers), when “no links” is 0 |
| R2004+ | – | Colour book colour (hard pointer), when the colour refers to one |
| R2000+ | 8 | LAYER (hard pointer) |
| R2000+ | 6 | LTYPE (hard pointer), when the linetype flags are 11 |
| R2007+ | – | MATERIAL, when the material flags are 11 |
| R2000+ | – | PLOTSTYLE (hard pointer), when the plot style flags are 11 |
| R2010+ | – | Full, face and edge visual styles (hard pointers), each when its flag is set |
Worked example: an R14 ENDBLK
The specification prints this ENDBLK object, handle 1B, from an R14 file. The decoding below follows the bits through the R13–R14 common entity data.
0F 00 size 15
41 40 46 E2 48 00 00 05 5B 18 28 87 A0 20 20 data and handles
2E 8B CRC
01000001 01000000 01000110 11100010 01001000 00000000 00000000 00000101
01011011 00011000 00101000 10000111 10100000 00100000 00100000
| Bits | Field | Value |
|---|---|---|
01 00000101 | Type (BS, one byte) | 5, ENDBLK |
0000 0001 00011011 | Handle: code 0, one byte | 0x1B |
10 | EED size (BS) | 0: no extended data |
0 | Graphic present | No |
| 32 bits | Object size (RL) | 0x49 = 73 bits |
10 | Entity mode | Model space, no owner reference |
10 | Number of reactors (BL) | 0 |
1 | Is by-layer linetype | Yes |
0 | No links | 0: previous and next handles follow |
11 | Colour (BS) | 256, by layer |
01 | Linetype scale (BD) | 1.0 |
10 | Invisibility (BS) | 0, visible; the data ends at bit 73, as the object size says |
0011 0000 | Extension dictionary: code 3, no bytes | None |
0101 0001 00001111 | Layer: code 5, one byte | 0x0F, layer 0 (5.1.0F) |
0100 0000 | Previous entity: code 4, no bytes | – |
0100 0000 | Next entity: code 4, no bytes | – |
| remaining bits | Padding to the byte boundary | – |
Entities
Each entity begins with the common entity data and its handle stream begins with the common entity handle data; every entity ends with the CRC. The tables list only what comes after the common data.
TEXT (1)
| Field | Type | DXF | Notes |
|---|---|---|---|
| R13–R14 | |||
| Elevation | BD | – | – |
| Insertion point | 2RD | 10 | – |
| Alignment point | 2RD | 11 | – |
| Extrusion | 3BD | 210 | – |
| Thickness | BD | 39 | – |
| Oblique angle | BD | 51 | – |
| Rotation angle | BD | 50 | – |
| Height | BD | 40 | – |
| Width factor | BD | 41 | – |
| Text value | TV | 1 | – |
| Generation | BS | 71 | – |
| Horizontal alignment | BS | 72 | – |
| Vertical alignment | BS | 73 | – |
| R2000 and later | |||
| Data flags | RC | – | Say which of the following are present |
| Elevation | RD | – | If !(flags & 0x01) |
| Insertion point | 2RD | 10 | – |
| Alignment point | 2DD | 11 | If !(flags & 0x02); defaults are the 10 values |
| Extrusion | BE | 210 | – |
| Thickness | BT | 39 | – |
| Oblique angle | RD | 51 | If !(flags & 0x04) |
| Rotation angle | RD | 50 | If !(flags & 0x08) |
| Height | RD | 40 | – |
| Width factor | RD | 41 | If !(flags & 0x10) |
| Text value | TV | 1 | – |
| Generation | BS | 71 | If !(flags & 0x20) |
| Horizontal alignment | BS | 72 | If !(flags & 0x40) |
| Vertical alignment | BS | 73 | If !(flags & 0x80) |
| Handles | |||
| STYLE | H | 7 | Hard pointer |
ATTRIB (2)
The TEXT fields, then:
| Field | Type | DXF | Notes |
|---|---|---|---|
| Version | RC | – | R2010+ |
| Attribute type | RC | 71 | R2018+: 1 single line, 2 multi-line (ATTRIB), 4 multi-line (ATTDEF) |
| If multi-line (R2018+) | |||
| MTEXT fields | – | – | All fields of an embedded MTEXT, from the entity mode on; the owner handle can be 0 |
| Annotative data size | BS | – | If above 0, the next three fields follow |
| Annotative data | RC × size | – | Byte array |
| Registered application | H | – | Hard pointer |
| Unknown | BS | 72? | Value 0 |
| Tag | TV | 2 | – |
| Unknown | BS | 73? | Value 0 |
| Flags | RC | 70 | 0 none, 1 invisible, 2 constant, 4 input verification required, 8 preset |
| Lock position | B | 280 | – |
| If single line (always, before R2018) | |||
| Tag | TV | 2 | – |
| Field length | BS | 73 | Unused |
| Flags | RC | 70 | Not bit-pair coded |
| Lock position | B | 280 | R2007+ |
ATTDEF (3)
The ATTRIB fields, then a version RC (R2010+) and the prompt (TV, DXF 3).
BLOCK (4), ENDBLK (5) and SEQEND (6)
BLOCK has one field after the common data: the block name (TV, DXF 2). ENDBLK and SEQEND have none. The specification notes that the BLOCK HEADER object holds the block’s real data, and the BLOCK entity is almost a dummy.
INSERT (7)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Insertion point | 3BD | 10 | – |
| X, Y, Z scale | BD × 3 | 41, 42, 43 | R13–R14 |
| Data flags | BB | – | R2000+: how the scale is stored (below) |
| Scale data | varies | 41–43 | R2000+ |
| Rotation | BD | 50 | – |
| Extrusion | 3BD | 210 | – |
| Has ATTRIBs | B | 66 | 1 if ATTRIBs follow |
| Owned object count | BL | – | R2004+ |
| Handles | |||
| BLOCK HEADER | H | 2 | Hard pointer |
| First and last ATTRIB | H, H | – | R13–R2000, if 66 is set; soft pointers, may be null |
| ATTRIBs | H × count | – | R2004+: hard owner, owned object count times |
| SEQEND | H | – | Hard owner, if 66 is set |
| Data flags | Scale data |
|---|---|
| 11 | Scale is (1.0, 1.0, 1.0); nothing stored |
| 01 | X is 1.0; Y and Z follow as two DD with default 1.0 |
| 10 | X as an RD; Y and Z are not stored and equal X |
| 00 | X as an RD, then Y and Z as DD with X as the default |
MINSERT (8)
As INSERT up to the owned object count, then column count (BS, 70), row count (BS, 71), column spacing (BD, 44) and row spacing (BD, 45). The handles are as INSERT’s, except that the R2004+ ATTRIB handles are listed as soft pointers.
VERTEX (10 to 14)
| Type | Fields after the common data |
|---|---|
| 2D (10) | Flags (EC, 70, not bit-pair coded); point (3BD, 10; Z always seems to be 0, take it from the 2D POLYLINE’s elevation); start width (BD, 40; if negative, its absolute value is both start and end width and no end width follows); end width (BD, 41); bulge (BD, 42); vertex ID (BL, 91, R2010+); tangent direction (BD, 50) |
| 3D (11) | Flags (EC, 70); point (3BD, 10) |
| MESH (12) | As 3D |
| PFACE (13) | As 3D. R13 files seem to have colour and linetype for all PFACE vertices; R12 omits them for location vertices |
| PFACE FACE (14) | Four 1-based vertex indices (BS, 71, 72, 73, 74) |
2D POLYLINE (15)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Flags | BS | 70 | – |
| Curve type | BS | 75 | Curve and smooth surface type |
| Start width | BD | 40 | Default start width |
| End width | BD | 41 | Default end width |
| Thickness | BT | 39 | – |
| Elevation | BD | 10 | The 10 point is (0, 0, elevation) |
| Extrusion | BE | 210 | – |
| Owned object count | BL | – | R2004+ |
| Handles | |||
| First and last VERTEX | H, H | – | R13–R2000, soft pointers |
| VERTEX | H × count | – | R2004+, hard owner |
| SEQEND | H | – | Hard owner |
3D POLYLINE (16)
Two RC flag bytes, neither of them directly a DXF value. The first: bit 0 means splined with 75 = 5, bit 1 splined with 75 = 6 (set 70 bit 2 if either is set). The second: bit 0 closed (70 bit 0); set 70 bit 3 because this is a 3D polyline. Then the owned object count (BL, R2004+) and the same handles as the 2D POLYLINE.
ARC (17)
Centre (3BD, 10), radius (BD, 40), thickness (BT, 39), extrusion (BE, 210), start angle (BD, 50), end angle (BD, 51).
CIRCLE (18)
Centre (3BD, 10), radius (BD, 40), thickness (BT, 39), extrusion (BE, 210).
LINE (19)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Start point, end point | 3BD, 3BD | 10, 11 | R13–R14 |
| Z’s are zero | B | – | R2000+ |
| Start x | RD | 10 | R2000+ |
| End x | DD | 11 | R2000+; default start x |
| Start y | RD | 20 | R2000+ |
| End y | DD | 21 | R2000+; default start y |
| Start z | RD | 30 | R2000+, only if “Z’s are zero” is 0 |
| End z | DD | 31 | R2000+, only if “Z’s are zero” is 0; default start z |
| Thickness | BT | 39 | – |
| Extrusion | BE | 210 | – |
DIMENSION (20 to 26)
All dimensions start with this common dimension data:
| Field | Type | DXF | Notes |
|---|---|---|---|
| Version | RC | 280 | R2010+: 0 = R2010 |
| Extrusion | 3BD | 210 | – |
| Text midpoint | 2RD | 11 | – |
| Elevation | BD | 11, 12 | Z of the ECS points 11, 12 and 16 |
| Flags 1 | RC | 70 | Not the 70 value but helps make it: bit 0 is the opposite of 70 bit 7 (128); bit 1 is 70 bit 5 (32). The 70 value is the dimension type plus these bits and Flags 2 |
| User text | TV | 1 | – |
| Text rotation | BD | 53 | – |
| Horizontal direction | BD | 51 | – |
| Insert X, Y, Z scale | BD × 3 | 41, 42, 43 | For inserting the anonymous block (undocumented in DXF) |
| Insert rotation | BD | 54 | – |
| Attachment point | BS | 71 | R2000+ |
| Line spacing style | BS | 72 | R2000+ |
| Line spacing factor | BD | 41 | R2000+ |
| Actual measurement | BD | 42 | R2000+ |
| Unknown | B | 73 | R2007+ |
| Flip arrow 1, flip arrow 2 | B, B | 74, 75 | R2007+ |
| 12 point | 2RD | 12 | – |
Then, by type; every dimension’s handles end with DIMSTYLE (DXF 3) and the anonymous block (DXF 2), both hard pointers:
| Type | Fields |
|---|---|
| ORDINATE (20) | 10, 13, 14 points (3BD); Flags 2 (RC, 70): bit 0 is 70 bit 6 (64) |
| LINEAR (21) | 13, 14, 10 points (3BD); extension line rotation (BD, 52); dimension rotation (BD, 50) |
| ALIGNED (22) | 13, 14, 10 points (3BD); extension line rotation (BD, 52) |
| ANGULAR 3-POINT (23) | 10, 13, 14, 15 points (3BD) |
| ANGULAR 2-LINE (24) | 16 point (2RD); 13, 14, 15, 10 points (3BD) |
| RADIUS (25) | 10, 15 points (3BD); leader length (D, 40) |
| DIAMETER (26) | 15, 10 points (3BD); leader length (BD, 40) |
| ARC_DIMENSION (class) | Arc dimension, from AutoCAD 2004; class AcDbArcDimension, app “ObjectDBX Classes”, version R18, proxy flags 0x401. Dimension arc point (3BD, 10); extension line 1 and 2 points (3BD, 13, 14); arc centre (3BD, 15); is partial (B, 70); start and end angles in radians (BD, 40, 41); has leader (B, 71); leader points 1 and 2 (3BD, 16, 17) |
| LARGE_RADIAL_DIMENSION (class) | Jogged radius dimension, from AutoCAD 2004; class AcDbRadialDimensionLarge, proxy flags 0x401. Centre (3BD, 10); chord point (3BD, 13); unknown (BD, 40, value 0); override centre (3BD, 14); jog point (3BD, 15) |
POINT (27)
Point (3BD, 10), thickness (BT, 39), extrusion (BE, 210), X-axis angle (BD, 50).
3DFACE (28)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Four corners | 3BD × 4 | 10–13 | R13–R14 |
| Invisible edge flags | BS | 70 | R13–R14 |
| Has no flag indicator | B | – | R2000+ |
| Z is zero | B | – | R2000+ |
| First corner x, y | RD, RD | 10, 20 | R2000+ |
| First corner z | RD | 30 | R2000+, only if “Z is zero” is 0 |
| Second corner | 3DD | 11 | R2000+; default the first corner |
| Third corner | 3DD | 12 | R2000+; default the second corner |
| Fourth corner | 3DD | 13 | R2000+; default the third corner |
| Invisible edge flags | BS | 70 | R2000+, only if “has no flag indicator” is 0 |
POLYLINE (PFACE) (29) and POLYLINE (MESH) (30)
PFACE: number of vertices (BS, 71), number of faces (BS, 72), owned object count (BL, R2004+). MESH: flags (BS, 70), curve type (BS, 75), M and N vertex counts (BS, 71, 72), M and N densities (BS, 73, 74), owned object count (BL, R2004+). Both have the first and last VERTEX handles (soft pointers) in R13 to R2000, or one VERTEX handle per owned object from R2004 (soft pointers), and then the SEQEND (hard owner).
SOLID (31) and TRACE (32)
Thickness (BT, 39), elevation (BD, the Z of points 10 to 13), four corners (2RD, 10, 11, 12, 13), extrusion (BE, 210).
SHAPE (33)
Insertion point (3BD, 10), scale (BD, 40, default 1), rotation (BD, 50, radians, default 0), width factor (BD, 41, default 1), oblique angle (BD, 51, radians, default 0), thickness (BD, 39), shape number (BS, 2: an index; DXF stores the name, found by searching the shapes of the text styles that hold shape files), extrusion (3BD, 210). Handle: the SHAPEFILE (STYLE) object, hard pointer.
VIEWPORT (34)
| Field | Type | DXF | Versions |
|---|---|---|---|
| Centre | 3BD | 10 | All |
| Width, height | BD, BD | 40, 41 | All |
| View target | 3BD | 17 | R2000+ |
| View direction | 3BD | 16 | R2000+ |
| View twist angle | BD | 51 | R2000+ |
| View height | BD | 45 | R2000+ |
| Lens length | BD | 42 | R2000+ |
| Front clip Z, back clip Z | BD, BD | 43, 44 | R2000+ |
| Snap angle | BD | 50 | R2000+ |
| View centre, snap base, snap spacing, grid spacing | 2RD × 4 | 12, 13, 14, 15 | R2000+ |
| Circle zoom | BS | 72 | R2000+ |
| Grid major | BS | 61 | R2007+ |
| Frozen layer count | BL | – | R2000+ |
| Status flags | BL | 90 | R2000+ |
| Style sheet | TV | 1 | R2000+ |
| Render mode | RC | 281 | R2000+ |
| UCS at origin, UCS per viewport | B, B | 74, 71 | R2000+ |
| UCS origin, X axis, Y axis | 3BD × 3 | 110, 111, 112 | R2000+ |
| UCS elevation | BD | 146 | R2000+ |
| UCS ortho view type | BS | 79 | R2000+ |
| Shade plot mode | BS | 170 | R2004+ |
| Use default lights | B | 292 | R2007+ |
| Default lighting type | RC | 282 | R2007+ |
| Brightness, contrast | BD, BD | 141, 142 | R2007+ |
| Ambient light colour | CMC | 63 | R2007+ |
| Handles | |||
| VIEWPORT ENT HEADER | H | – | R13–R14, and R2000 (after the clip boundary); hard pointer |
| Frozen layers | H × count | 341 | R2000+; hard pointers until R2000, soft from R2004 |
| Clip boundary | H | 340 | R2000+; soft pointer |
| Named UCS, base UCS | H, H | 345, 346 | R2000+; hard pointers |
| Background | H | 332 | R2007+; soft pointer |
| Visual style | H | 348 | R2007+; hard pointer |
| Shade plot ID | H | 333 | R2007+; soft pointer |
| Sun | H | 361 | R2007+; hard owner |
ELLIPSE (35)
Centre (3BD, 10) and semi-major axis vector (3BD, 11), both in world coordinates even though the ellipse has an extrusion; extrusion (3BD, 210); minor to major axis ratio (BD, 40); start and end angles (BD, 41, 42; eccentric anomaly, radians).
SPLINE (36)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Scenario | BL | – | 2 for fit points only, 1 for control points and knots |
| Spline flags 1 | BL | – | R2013+: 1 method fit points, 2 CV frame show, 4 is closed (copied to the closed bit, but overwritten in scenario 2), 8 use knot parameter |
| Knot parameter | BL | – | R2013+: 0 chord, 1 square root, 2 uniform, 15 custom. The scenario becomes 1 if this is custom or there is no fit data, otherwise 2; without fit data the knot parameter becomes custom |
| Degree | BL | – | – |
| If scenario 2 | |||
| Fit tolerance | BD | 44 | – |
| Start tangent | 3BD | 12 | Normalised |
| End tangent | 3BD | 13 | Normalised |
| Number of fit points | BL | 74 | A long, though a short in DXF |
| If scenario 1 | |||
| Rational | B | – | Flag bit 2 |
| Closed | B | – | Flag bit 0 |
| Periodic | B | – | Flag bit 1 |
| Knot tolerance | BD | 42 | – |
| Control point tolerance | BD | 43 | – |
| Number of knots | BL | 72 | A long, though a short in DXF |
| Number of control points | BL | 73 | A long, though a short in DXF |
| Weight | B | – | Seems to echo the “weights present” bit |
| Then | |||
| Knots | BD × knots | – | – |
| Control points | 3BD (+ D) | 10 (41) | Each with a weight if weights are present |
| Fit points | 3BD × fit points | – | – |
REGION (37), 3DSOLID (38) and BODY (39)
These are ACIS entities, which the ODA can step through and write but has not
fully decoded. After the common data: ACIS empty bit (B; 1 means no data follows),
an unknown bit (B) and a version (BS, 1 or 2). In version 1, blocks of SAT data
follow, each a BL size and that many bytes, until a size of 0; bytes from 0x20 to
0x7E are stored as 0x9F minus the character, and tabs become spaces. In version 2
an ACIS file follows directly: SAB if it starts with ACIS BinaryFile,
otherwise SAT text that must be parsed to find its end. From R2013 the ACIS data
may be in the data store instead. The
specification continues with further fields (section 20.4.41) that this page does
not reproduce.
RAY (40) and XLINE (41)
Point (3BD, 10) and vector (3BD, 11).
MTEXT (44)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Insertion point | 3BD | 10 | First picked point; its place relative to the text depends on the attachment point |
| Extrusion | 3BD | 210 | – |
| X-axis direction | 3BD | 11 | Kept as a unit vector |
| Rectangle width | BD | 41 | Reference rectangle width |
| Rectangle height | BD | 46 | R2007+ |
| Text height | BD | 40 | – |
| Attachment | BS | 71 | – |
| Drawing direction | BS | 72 | – |
| Extents height, extents width | BD, BD | – | Not in DXF; the rectangle that fits the text image |
| Text | TV | 1, 3 | All the text in one string; DXF splits it into 250-character pieces |
| Line spacing style | BS | 73 | R2000+ |
| Line spacing factor | BD | 44 | R2000+ |
| Unknown | B | – | R2000+ |
| Background flags | BL | 90 | R2004+: 0 none, 1 background fill, 2 fill with the drawing’s fill colour, 0x10 text frame (R2018+) |
| Background scale factor | BL | 45 | R2004+, if flags & 0x01 (or 0x10 in R2018); default 1.5 |
| Background colour | CMC | 63 | As above |
| Background transparency | BL | 441 | As above |
| R2018+ | |||
| Is not annotative | B | – | The rest is present only when this is set |
| Version | BS | – | Default 0 |
| Default flag | B | – | Default true |
| Registered application | H | – | Hard pointer |
| Attachment point | BL | – | Repeats the value above |
| X-axis direction, insertion point | 3BD, 3BD | 10, 11 | Repeated |
| Rectangle width, height; extents width, height | BD × 4 | 40–43 | Repeated |
| Column type | BS | 71 | 0 none, 1 static, 2 dynamic |
| Column height count | BL | 72 | If there are columns |
| Column width, gutter | BD, BD | 44, 45 | If there are columns |
| Auto height, flow reversed | B, B | 73, 74 | If there are columns |
| Column heights | BD × count | 46 | If not auto height and dynamic columns |
| Handles | |||
| STYLE | H | 7 | Hard pointer |
TOLERANCE (46)
In R13 and R14: an unknown short, a height (BD) and the DIMGAP at creation times DIMSCALE (BD). Then: insertion point (3BD, 10), X direction (3BD, 11), extrusion (3BD, 210), text string (DXF 1; the specification gives its type as BS). Handle: DIMSTYLE, hard pointer.
MLINE (47)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Scale | BD | 40 | – |
| Justification | EC | – | 0 top, 1 centre, 2 bottom |
| Base point | 3BD | 10 | – |
| Extrusion | 3BD | 210 | – |
| Open or closed | BS | – | 1 open, 3 closed |
| Lines in style | RC | 73 | – |
| Number of vertices | BS | 72 | – |
| Each vertex | |||
| Vertex, direction, miter direction | 3BD × 3 | – | – |
| Then for each line in the style: number of segment parameters (BS) and the parameters (BD each), number of area fill parameters (BS) and the parameters (BD each) | |||
| Handles | |||
| MLINESTYLE | H | – | Hard pointer |
LWPOLYLINE (LWPLINE)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Flag | BS | 70 | Says which of the following are present |
| Constant width | BD | 43 | If flag & 4 |
| Elevation | BD | 38 | If flag & 8 |
| Thickness | BD | 39 | If flag & 2 |
| Normal | 3BD | 210 | If flag & 1 |
| Number of points | BL | 90 | – |
| Number of bulges | BL | – | If flag & 16 |
| Vertex ID count | BL | – | R2010+, if flag & 1024 |
| Number of widths | BL | – | If flag & 32 |
| Points | 2RD × points | 10 | R13–R14 |
| Points | 2RD, then 2DD × (points − 1) | 10, 20 | R2000+: each x and y uses the previous point’s value as default |
| Bulges | BD × bulges | 42 | – |
| Vertex IDs | BL × count | 91 | – |
| Widths | 2BD × widths | 40, 41 | Start and end width |
Objects
Non-entity objects begin with the common object format: size, type, the object size in bits (R2000 and later), handle, extended data, the bit size (R13–R14), the number of reactors and the XDic missing flag (R2004+). Their handle streams begin with the owner or parent, the reactors and the extension dictionary. The tables list what follows.
DICTIONARY (42) and DICTIONARYWDFLT
| Field | Type | DXF | Notes |
|---|---|---|---|
| Number of items | L | – | – |
| Unknown | RC | – | R14 only; always 0 |
| Cloning flag | BS | 281 | R2000+ |
| Hard owner flag | RC | 280 | R2000+ |
| Entry names | TV × items | – | – |
| Handles | |||
| Parent | H | – | Soft relative pointer |
| Reactors, extension dictionary | H | – | Soft pointers; hard owner |
| Item handles | H × items | – | Soft owner, one per name |
DICTIONARYWDFLT (a dictionary with a default) adds the default entry handle (H, DXF 7, hard pointer).
Control objects
Each symbol table has a control object, owned by the root object (its owner handle is 0), with an entry count (BL, 70) and a list of entry handles after a null soft pointer and the extension dictionary:
| Type | Entry count | Entry handles |
|---|---|---|
| BLOCK CONTROL (48) | Not counting *MODEL_SPACE and *PAPER_SPACE | The block headers (soft owner), then *MODEL_SPACE and *PAPER_SPACE (hard owner) |
| LAYER CONTROL (50) | Counts layer 0 | The layers (soft owner) |
| STYLE (SHAPEFILE) CONTROL (52) | Number of style handles | The styles (soft owner) |
| LTYPE CONTROL (56) | Not counting BYBLOCK and BYLAYER | The linetypes (soft owner), ending with BYLAYER and BYBLOCK (hard owner) |
The specification also describes the VIEW (60), UCS (62), VPORT (64), APPID (66), DIMSTYLE (68) and VIEWPORT ENTITY (70) control objects (sections 20.4.59 to 20.4.69).
Common table entry fields
Every symbol table entry starts with:
| Field | Type | DXF | Notes |
|---|---|---|---|
| Entry name | TV | 2 | – |
| 64 flag | B | 70 | Bit 64 of the 70 value |
| Xref index + 1 | BS | 70 | Subtract 1: −1 means not from an xref, otherwise the index of the xref’s block header |
| Xref dependent | B | 70 | Bit 16 of the 70 value |
BLOCK HEADER (49)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Common table entry fields | – | 2, 70 | Above |
| Anonymous | B | 70 | Bit 1 |
| Has attribute definitions | B | 70 | Bit 2 |
| Block is xref | B | 70 | Bit 4 |
| Xref overlaid | B | 70 | Bit 8 |
| Loaded | B | – | R2000+; 0 means loaded, for an xref |
| Owned object count | BL | – | R2004+ |
| Base point | 3BD | 10 | – |
| Xref path name | TV | 1, 3 | – |
| Insert count | RC… | – | R2000+: non-zero RCs ended by a 0 RC; their number is the number of insert handles |
| Block description | TV | 4 | R2000+ |
| Preview data size | BL | – | R2000+ |
| Binary preview data | RC × size | 310 | R2000+ |
| Insert units | BS | 70 | R2007+ |
| Explodable | B | 280 | R2007+ |
| Block scaling | RC | 281 | R2007+ |
| Handles | |||
| Block control | H | – | Soft pointer; then reactors and extension dictionary |
| Null | H | – | Hard pointer |
| BLOCK entity | H | – | Hard owner |
| First and last entity | H, H | – | R13–R2000, unless the block is an xref or overlaid xref; soft pointers |
| Entities | H × count | – | R2004+; hard owner |
| ENDBLK entity | H | – | Hard owner |
| Inserts | H × insert count | – | R2000+; soft pointers |
| Layout | H | – | R2000+; hard pointer |
LAYER (51)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Common table entry fields | – | 2, 70 | Above |
| Frozen | B | 70 | R13–R14; bit 1 |
| On | B | – | R13–R14; AutoCAD shows an off layer by negating its colour |
| Frozen in new viewports | B | 70 | R13–R14; bit 2 |
| Locked | B | 70 | R13–R14; bit 4 |
| Values | BS | 70, 290, 370 | R2000+: frozen 1, on 2, frozen in new viewports 4, locked 8, plotting 16, lineweight in mask 0x03E0 |
| Colour | CMC | 62 | – |
| Handles | |||
| Layer control | H | – | Soft pointer; then reactors and extension dictionary |
| External reference block | H | – | Hard pointer |
| Plot style | H | 390 | R2000+; hard pointer, by default to the PLACEHOLDER with handle 0x0F |
| Material | H | 347 | R2007+ |
| Linetype | H | 6 | Hard pointer |
| Unknown | H | – | Hard pointer; always seems to be null |
STYLE (SHAPEFILE) (53)
A text style for TEXT and MTEXT:
| Field | Type | DXF | Notes |
|---|---|---|---|
| Common table entry fields | – | 2, 70 | Above |
| Vertical | B | – | Flag bit 1 |
| Shape file | B | – | Flag bit 4: a shape file rather than a font |
| Fixed height | BD | 40 | – |
| Width factor | BD | 41 | – |
| Oblique angle | BD | 50 | – |
| Generation | RC | 71 | Not bit-pair coded |
| Last height | BD | 42 | – |
| Font name | TV | 3 | – |
| Big font name | TV | 4 | – |
| Handles | |||
| Style control, external reference block | H, H | – | Soft pointer (then reactors, extension dictionary); hard pointer |
Sometimes TrueType font information is kept in the entry’s extended data: 1001
the font file name, an optional 1002 {, a 1071 flags value (bold
0x02000000, italic 0x01000000, pitch mask 0x00000003, family mask 0x000000F0,
character set mask 0x0000FF00) and an optional 1002 }.
LTYPE (57)
| Field | Type | DXF | Notes |
|---|---|---|---|
| Common table entry fields | – | 2, 70 | Above |
| Description | TV | 3 | – |
| Pattern length | BD | 40 | – |
| Alignment | RC | 72 | Always A |
| Number of dashes | RC | 73 | – |
| Each dash | |||
| Dash length | BD | 49 | – |
| Complex shape code | BS | 75 | Shape number if shape flag has 2; index into the string area if it has 4 |
| X offset, Y offset | RD, RD | 44, 45 | 0.0 for a simple dash |
| Scale | BD | 46 | 1.0 for a simple dash |
| Rotation | BD | 50 | 0.0 for a simple dash |
| Shape flag | BS | 74 | 1: text rotated 0°, otherwise it follows the segment; 2: the shape code is a shape index; 4: the shape code is an index into the string area |
| Then | |||
| String area | X | 9 | R2004 and earlier: 256 bytes of zero-terminated strings (in R13 the first byte is always 0). R2007+: 512 bytes, present only if a shape flag has 0x02 set |
| Handles | |||
| Ltype control, external reference block | H, H | – | Soft pointer (then reactors, extension dictionary); hard pointer |
| Shape files | H × dashes | 340 | One per dash; hard pointers |
APPID (67)
The common table entry fields, then an unknown RC (DXF 71, not in DXF when 0). Handles: the APPID control (soft pointer), reactors, extension dictionary and the external reference block (hard pointer).
GROUP (72)
Name (TV), unnamed (BS, 1 if the group has no name), selectable (BS, 1 if selectable), number of handles (BL). Handles: parent (soft pointer), reactors, extension dictionary, then the group’s entries (hard pointers).
DICTIONARYVAR
An integer value (RC) and a string (the specification gives the type as BS). Handles: parent (soft pointer), reactors and extension dictionary.
XRECORD
Number of data bytes (BL), the data bytes, then a cloning flag (BS, 280, R2000+). The data is pairs of an RS group code and a value in the DXF convention: code 1 is a string (in R13 to R2004 a length RC, the code page RC and the bytes; from R2007 a short length and that many UTF-16 characters), 70 a 2-byte short, 10 three 8-byte doubles, 40 one double, and so on. Handles: parent (soft pointer), reactors, extension dictionary, then object handles until the data runs out.
Objects described in the specification but not here
Chapter 20 of the specification also gives the fields of these, which this page does not yet reproduce:
| Object | Section |
|---|---|
| LEADER (45) | 20.4.47 |
| MLEADER | 20.4.48 |
| VIEW (61) | 20.4.60 |
| UCS (63) | 20.4.62 |
| VPORT (65) | 20.4.64 |
| DIMSTYLE (69) | 20.4.68 |
| VIEWPORT ENTITY HEADER (71) | 20.4.70 |
| AcDbAnnotScaleObjectContextData | 20.4.71 |
| MLINESTYLE (73) | 20.4.73 |
| HATCH | 20.4.75 |
| FIELD, FIELDLIST | 20.4.76, 20.4.77 |
| GEODATA | 20.4.78 |
| IDBUFFER | 20.4.79 |
| IMAGE, IMAGEDEF, IMAGEDEFREACTOR | 20.4.80 to 20.4.82 |
| LAYER_INDEX | 20.4.83 |
| LAYOUT | 20.4.84 |
| MLeaderAnnotContext, MLEADERSTYLE | 20.4.86, 20.4.87 |
| OLE2FRAME | 20.4.88 |
| AcDbObjectContextData | 20.4.89 |
| PROXY (ACAD_PROXY_ENTITY and ACAD_PROXY_OBJECT) | 20.4.90 |
| RASTERVARIABLES | 20.4.91 |
| SCALE | 20.4.92 |
| SORTENTSTABLE | 20.4.93 |
| SPATIAL_FILTER, SPATIAL_INDEX | 20.4.94, 20.4.95 |
| TABLE, TABLECONTENT, cell content geometry, value, custom data collection | 20.4.96 to 20.4.100 |
| TABLESTYLE, CELLSTYLEMAP, TABLEGEOMETRY | 20.4.101 to 20.4.103 |
Extended entity data
Extended data (EED, DXF −3) follows the object’s handle. For each application:
a BS length of the data (not counting itself or the application handle), the
application’s handle (a table handle, 0101, a 4-bit length and the
handle bytes), then the data items. This repeats until a length of 0. Each item is
a 1-byte code, the DXF group code minus 1000, then the value, which is not bit
coded:
| Code | DXF | Value |
|---|---|---|
| 0 | 1000 | String. R13–R2004: a length byte N, a 2-byte code page and N bytes. R2007+: a 2-byte length N and N UTF-16 characters |
| 1 | 1001 | Seems to be invalid here; the application is already given above |
| 2 | 1002 | One byte: 0 means {, 1 means } |
| 3 | 1003 | Layer reference: the layer’s handle as 8 bytes, even if the leading ones are 0; no length |
| 4 | 1004 | Binary chunk: a length byte, then the bytes |
| 5 | 1005 | Entity handle: 8 bytes, no length |
| 10–13 | 1010–1013 | Points: three doubles, 24 bytes |
| 40–42 | 1040–1042 | Reals: one double, 8 bytes |
| 70 | 1070 | Short, 2 bytes |
| 71 | 1071 | Long, 4 bytes |
Proxy entity graphics
Proxy entities (called zombies before R14) and a few others carry graphics, when the “graphic present” bit is 1. The data is padded to 4-byte boundaries, strings included. Besides the usual types it uses PS, a zero-terminated string in the file’s code page, and PUS, a UTF-16 string ended by two zero bytes. It is a series of chunks, each an RL size, an RL type and the type’s data:
| Type | Name | Data |
|---|---|---|
| 1 | Extents | Minimum and maximum (3RD each) |
| 2 | CIRCLE | Centre (3RD), radius (RD), normal (3RD) |
| 3 | CIRCLE3PT | Three points (3RD each) |
| 4 | CIRCULARARC | Centre (3RD), radius (RD), normal (3RD), start vector (3RD), sweep angle (RD), arc type (RL) |
| 5 | CIRCULARARC3PT | Three points (3RD each), arc type (RL) |
| 6 | POLYLINE | Number of points (RL), points (3RD each) |
| 7 | POLYGON | Number of points (RL), points (3RD each) |
| 8 | MESH | Rows and columns (RL, RL), rows × columns vertices (3RD), then edge, face and vertex primitive flags, each followed by the traits they select (below) |
| 9 | SHELL | Number of points (RL), vertices (3RD), number of face entries (RL), face entries (RL; a negative entry −n is followed by the n vertex indices of a face), then edge, face and vertex primitive flags and traits |
| 10 | TEXT | Start point, normal, text direction (3RD each), height, width factor, oblique angle (RD each), string (PS) |
| 11 | TEXT2 | Start point, normal, direction (3RD), string (PS), length (RL, −1 if zero terminated), raw (RL: 0 raw, 1 interpret %% codes), height, width factor, oblique angle, tracking percentage (RD), backwards, upside down, vertical, underlined, overlined (RL each, 0 or 1), font file name and big font file name (PS) |
| 12 | XLINE | Two points (3RD) |
| 13 | RAY | Two points (3RD) |
| 14 | SUBENT_COLOR | Colour (RL) |
| 16 | SUBENT_LAYER | Layer index (RL) |
| 18 | SUBENT_LINETYPE | Linetype index (RL); 0xFFFFFFFF by layer, 0xFFFFFFFE by block |
| 19 | SUBENT_MARKER | Marker index (RL) |
| 20 | SUBENT_FILLON | Fill on if 1, off if 0 (RL) |
| 22 | SUBENT_TRUECOLOR | Red, green, blue (RC each) |
| 23 | SUBENT_LNWEIGHT | Lineweight (RL) |
| 24 | SUBENT_LTSCALE | Linetype scale (RD) |
| 25 | SUBENT_THICKNESS | Thickness (RD) |
| 26 | SUBENT_PLSTNAME | Type (RL: 0 by layer, 1 by block, 2 dictionary default, 3 plot style by ID), plot style index (RL) |
| 27 | PUSH_CLIP | Extrusion and clip boundary origin (3RD), number of points (RL), points (2RD), clip boundary transform and inverse block transform (16 RD each), front clip on and back clip on (RL), front and back clip (RD), draw boundary (RL) |
| 28 | POP_CLIP | Empty |
| 29 | PUSH_MODELXFORM | Transformation matrix (16 RD) |
| 30 | PUSH_MODELXFORM2 | Transformation matrix (16 RD), then unknown data |
| 31 | POP_MODELXFORM | Empty |
| 32 | Polyline with normal | Number of points (RL), points (3RD), normal (RD as printed) |
| 33 | LWPOLYLINE | Byte count (RL), then the LWPOLYLINE entity data from its flags to its widths, then three unknown bytes |
| 34 | Sub-entity material | Material handle (H) |
| 35 | Sub-entity mapper | Two dummy values, projection, U tiling, V tiling, auto transform, a third dummy value (RL each) |
| 36 | Unicode text | As TEXT (10), with the string in Unicode |
| 37 | Unknown | Empty |
| – | Unicode text 2 | As TEXT2 with PUS strings, plus TrueType font fields: bold, italic, character set, pitch and family (RL each), typeface and font file name (PUS); then the big font file name (PUS). The specification gives no type number |
The edge, face and vertex primitive flags of MESH and SHELL select per-item traits:
| Flag | Name | Edges | Faces | Vertices |
|---|---|---|---|---|
| 0xFFFF | Has primitive traits (any of the below) | – | – | – |
| 0x0001 | Colours | RL each | RL each | – |
| 0x0002 | Layers | RL each | RL each | – |
| 0x0004 | Linetypes | RL each | – | – |
| 0x0020 | Markers | RL each | RL each | – |
| 0x0040 | Visibilities | RL each | RL each | – |
| 0x0080 | Normals | – | 3RD each | 3RD each |
| 0x0400 | Orientation | – | – | One RL only |
For a MESH there are (rows − 1) × columns + (columns − 1) × rows edges and (rows − 1) × (columns − 1) faces.
Not confirmed
- Type numbers 0x09, 0x36, 0x37, 0x3A and 0x3B have no name in the specification’s table, though its prescriptions call 52 (0x34) SHAPEFILE CONTROL and 53 (0x35) SHAPEFILE where the table says STYLE CONTROL OBJ and STYLE.
- Several types appear both with fixed numbers and in the list of variable ones; the specification does not say which applies when.
- Some types in the prescriptions look like slips: the TOLERANCE text and the DICTIONARYVAR string are given as BS, and the polyline-with-normal proxy chunk gives its normal as one RD. They are shown as printed.
- The ODA does not fully understand the ACIS data of REGION, 3DSOLID and BODY, or the fields marked unknown above. The type code EC (vertex flags, MLINE justification) is not defined in the specification.
- The material flag value 10 (“global material?”) is uncertain in the specification itself.
Sources
- Open Design Specification for .dwg files, version 5.4.1 – Open Design Alliance; chapter 20 (AcDb:AcDbObjects), including the ENDBLK example in section 20.4.7.1, chapter 28 (extended entity data) and chapter 29 (proxy entity graphics)