AfraLISP - Learn AutoLISP for AutoCAD productivity

DXF Group Codes

by Kenny Ramage

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 this group code always has the same purpose. The purpose of group codes that aren't fixed can vary depending on the context.

Entity group codes by number :

Group CodeDescription
-5APP: persistent reactor chain
-4APP: conditional operator (used only with ssget)
-3APP: extended data (XDATA) sentinel (fixed)
-2APP: entity name reference (fixed)
-1APP: entity name. This changes each time a drawing is opened. It is never saved. (fixed)
0Text string indicating the entity type (fixed)
1Primary text value for an entity
2Name (attribute tag, block name, and so on)
3-4Other textual or name values
5Entity handle. Text string of up to 16 hexadecimal digits (fixed)
6Linetype name (fixed)
7Text style name (fixed)
8Layer name (fixed)
9DXF: variable name identifier (used only in HEADER section of the DXF file).
10Primary 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)
11-18Other points.
DXF: X value of other points (followed by Y value codes 21-28 and Z value codes 31-38)
APP: 3D point (list of three reals)
20, 30DXF: Y and Z values of the primary point
21-28, 31-37DXF: Y and Z values of other points
38DXF: entity's elevation if nonzero. Exists only in output from versions prior to AutoCAD Release 11.
39Entity's thickness if nonzero (fixed)
40-48Floating-point values (text height, scale factors, and so on)
48Linetype scale. Floating-point scalar value. Default value is defined for all entity types.
49Repeated 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.
50-58Angles (output in degrees to DXF files and radians through AutoLISP and ARX applications).
60Entity visibility. Integer value. Absence or 0 indicates visibility; 1 indicates invisibility.
62Color number (fixed)
66"Entities follow" flag (fixed)
67Space--that is, model or paper space (fixed)
68APP: identifies whether viewport is on but fully off screen; is not active or is off.
69APP: viewport identification number.
70-78Integer values, such as repeat counts, flag bits, or modes
90-9932-bit integer values
100Subclass data marker (with derived class name as a string). Required for all objects and entity classes that are derived from another concrete class to segregate 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 ARX (see "Subclass Markers").
102Control 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 allowable control string is "}" as a group terminator. As noted before, AutoCAD does not interpret these strings except during drawing audit operations; they are for application use.
105DIMVAR symbol table entry object handle
210Extrusion direction (fixed).
DXF: X value of extrusion direction
APP: 3D extrusion direction vector
220, 230DXF: Y and Z values of the extrusion direction
280-2898-bit integer values
300-309Arbitrary text strings
310-319Arbitrary 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.
320-329Arbitrary object handles. Handle values that are taken "as is." They are not translated during INSERT and XREF operations.
330-339Soft-pointer handle. Arbitrary soft pointers to other objects within same DXF file or drawing. Translated during INSERT and XREF operations.
340-349Hard-pointer handle. Arbitrary hard pointers to other objects within same DXF file or drawing. Translated during INSERT and XREF operations.
350-359Soft-owner handle. Arbitrary soft ownership links to other objects within same DXF file or drawing. Translated during INSERT and XREF operations.
360-369Hard-owner handle. Arbitrary hard ownership links to other objects within same DXF file or drawing. Translated during INSERT and XREF operations.
999DXF: The 999 group code indicates that the line following it is a comment string. DXFOUT does not include such groups in a DXF output file, but DXFIN honors them and ignores the comments. You can use the 999 group to include comments in a DXF file that you've edited.
1000ASCII string (up to 255 bytes long) in extended data.
1001Registered application name (ASCII string up to 31 bytes long) for extended data.
1002Extended data control string ("{"or "}").
1003 Extended data layer name.
1004Chunk of bytes (up to 127 bytes long) in extended data.
1005Entity handle in extended data. Text string of up to 16 hexadecimal digits
1010A point in extended data
DXF: X value (followed by 1020 and 1030 groups)
APP: 3D point
1011A 3D world space position in extended data
DXF: X value (followed by 1021 and 1031 groups)
APP: 3D point
1012A 3D world space displacement in extended data
DXF: X value (followed by 1022 and 1032 groups)
APP: 3D vector
1013A 3D world space direction in extended data.
DXF: X value (followed by 1022 and 1032 groups)
APP: 3D vector
1020, 1030DXF: Y and Z values of a point
1021, 1031DXF: Y and Z values of a World space position
1022, 1032DXF: Y and Z values of a World space displacement
1023, 1033DXF: Y and Z values of a World space direction
1040Extended data floating-point value.
1041Extended data distance value.
1042Extended data scale factor.
1070Extended data 16-bit signed integer.
1071Extended data 32-bit signed long.