Block
BLOCK (DXF Reference) entity is embedded into the BlockLayout
object.
The BLOCK entity is accessible by the BlockLayout.block
attribute.
Subclass of |
|
DXF type |
|
Factory function |
|
See also
Tutorial for Blocks and DXF Internals: Block Management Structures
- class ezdxf.entities.Block
- dxf.handle
BLOCK handle as plain hex string. (feature for experts)
- dxf.owner
Handle to owner as plain hex string. (feature for experts)
- dxf.layer
Layer name as string; default value is
'0'
- dxf.name
BLOCK name as string. (case insensitive)
- dxf.base_point
BLOCK base point as
(x, y, z)
tuple, default value is(0, 0, 0)
Insertion location referenced by the
Insert
entity to place the block reference and also the center of rotation and scaling.
- dxf.flags
BLOCK flags (bit-coded)
1
Anonymous block generated by hatching, associative dimensioning, other internal operations, or an application
2
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
Block is an external reference (xref)
8
Block is an xref overlay
16
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)
- dxf.xref_path
File system path as string, if this block defines an external reference (XREF).
- is_layout_block
Returns
True
if this is aModelspace
orPaperspace
block definition.
- is_anonymous
Returns
True
if this is an anonymous block generated by hatching, associative dimensioning, other internal operations, or an application.
- is_xref
Returns
True
if bock is an external referenced file.
- is_xref_overlay
Returns
True
if bock is an external referenced overlay file.
EndBlk
ENDBLK entity is embedded into the BlockLayout
object.
The ENDBLK entity is accessible by the BlockLayout.endblk
attribute.
Subclass of |
|
DXF type |
|
- class ezdxf.entities.EndBlk
- dxf.handle
BLOCK handle as plain hex string. (feature for experts)
- dxf.owner
Handle to owner as plain hex string. (feature for experts)
- dxf.layer
Layer name as string; should always be the same as
Block.dxf.layer