DXF Block

Top  Previous  Next

http://www.autodesk.com/techpubs/autocad/acad2000/dxf/block_dxf_05.htm

 

Chapter 5 -- BLOCKS Section

BLOCK

 

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 block-endblk 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.

The following group codes apply to block entities. For information about abbreviations and formatting used in this table, see "Formatting Conventions in This Reference."

 

Block group codes

 

Group codes        Description

 

0

 

Entity type (BLOCK)

 

5  Handle

 

102 (optional)

 

Start of application-defined group "{application_name". For example, "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group.

 

application-defined codes (optional)

 

 

Codes and values within the 102 groups are application defined

 

102 (optional)

 

End of group, "}"

 

330

 

Soft-pointer ID/handle to owner object

 

100

 

Subclass marker (AcDbEntity)

 

8

 

Layer name

 

100

 

Subclass marker (AcDbBlockBegin)

 

2

 

Block name

 

70

 

Block-type flags (bit coded values, may be combined):

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).

 

10

 

Base point

DXF: X value; APP: 3D point

 

20, 30

 

DXF: Y and Z values of base point

 

3

 

Block name

 

1

 

Xref path name

 

4

 

Block description (optional)

 

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 *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."

 

Endblk group codes

Group codes        Description

 

0 Entity type (ENDBLK)

 

5 Handle

 

102

Start of application-defined group "{application_name". For example, "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group (optional)

 

application-defined codes

 

 

Codes and values within the 102 groups are application defined (optional)

 

102 End of group, "}" (optional)

 

330 Soft-pointer ID/handle to owner object

 

100 Subclass marker (AcDbEntity)

 

8    Layer name

 

100

 

Subclass marker (AcDbBlockEnd)