Leader

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 Leader itself.

Leader shares its styling infrastructure with Dimension.

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 .

Subclass of

ezdxf.entities.DXFGraphic

DXF type

'LEADER'

Factory function

ezdxf.layouts.BaseLayout.add_leader()

Inherited DXF attributes

Common graphical DXF attributes

Required DXF version

DXF R2000 ('AC1015')

class ezdxf.entities.Leader
dxf.dimstyle

Name of Dimstyle as string.

dxf.has_arrowhead

0

Disabled

1

Enabled

dxf.path_type

Leader path type:

0

Straight line segments

1

Spline

dxf.annotation_type

0

Created with text annotation

1

Created with tolerance annotation

2

Created with block reference annotation

3

Created without any annotation (default)

dxf.hookline_direction

Hook line direction flag:

0

Hookline (or end of tangent for a splined leader) is the opposite direction from the horizontal vector

1

Hookline (or end of tangent for a splined leader) is the same direction as horizontal vector (see has_hook_line)

dxf.has_hookline

0

No hookline

1

Has a hookline

dxf.text_height

Text annotation height in drawing units.

dxf.text_width

Text annotation width.

dxf.block_color

Color to use if leader’s DIMCLRD = BYBLOCK

dxf.annotation_handle

Hard reference (handle) to associated annotation (MText, Tolerance, or Insert entity)

dxf.normal_vector

Extrusion vector? default = (0, 0, 1).

.dxf.horizontal_direction

Horizontal direction for leader, default = (1, 0, 0).

dxf.leader_offset_block_ref

Offset of last leader vertex from block reference insertion point, default = (0, 0, 0).

dxf.leader_offset_annotation_placement

Offset of last leader vertex from annotation placement point, default = (0, 0, 0).

vertices

List of Vector objects, representing the vertices of the leader (3D Point in WCS).

set_vertices(vertices: Iterable[Vertex])

Set vertices of the leader, vertices is an iterable of (x, y [,z]) tuples or Vector.