The LEADER entity (DXF Reference) represents an arrow, made up of one or more vertices
(or spline fit points) and an arrowhead. The label or other content to which the
Leader is attached
is stored as a separate entity, and is not part of the
By default a
Leader without any annotation is created. For creating more fancy leaders and annotations
see documentation provided by Autodesk or Demystifying DXF: LEADER and MULTILEADER implementation notes .
Inherited DXF attributes
Required DXF version
DXF R2000 (
- class ezdxf.entities.Leader¶
Leader path type:
Straight line segments
Created with text annotation
Created with tolerance annotation
Created with block reference annotation
Created without any annotation (default)
Hook line direction flag:
Hookline (or end of tangent for a splined leader) is the opposite direction from the horizontal vector
Hookline (or end of tangent for a splined leader) is the same direction as horizontal vector (see
Has a hookline
Text annotation height in drawing units.
Text annotation width.
Color to use if leader’s DIMCLRD = BYBLOCK
Extrusion vector? default =
(0, 0, 1).
Horizontal direction for leader, default =
(1, 0, 0).
Offset of last leader vertex from block reference insertion point, default =
(0, 0, 0).
Offset of last leader vertex from annotation placement point, default =
(0, 0, 0).
- set_vertices(vertices: Iterable[Vertex])¶
Set vertices of the leader, vertices is an iterable of (x, y [,z]) tuples or
- virtual_entities() Iterable[Union[Line, Arc]] ¶
Yields ‘virtual’ parts of LEADER as DXF primitives.
This entities are located at the original positions, but are not stored in the entity database, have no handle and are not assigned to any layout.
- explode(target_layout: BaseLayout = None) EntityQuery ¶
Explode parts of LEADER as DXF primitives into target layout, if target layout is
None, the target layout is the layout of the LEADER.
EntityQuerycontainer with all DXF parts.
target_layout – target layout for DXF parts,
Nonefor same layout as source entity.
New in version 0.14.