MLeaderStyle

The MLEADERSTYLE entity (DXF Reference) stores all attributes required to create new MultiLeader entities. The meaning of these attributes are not really documented in the DXF Reference. The default style “Standard” always exist.

Create a new MLeaderStyle:

import ezdxf

doc = ezdxf.new()
new_style = doc.mleader_styles.new("NewStyle")

Duplicate an existing style:

duplicated_style = doc.mleader_styles.duplicate_entry("Standard", "DuplicatedStyle")

Subclass of

ezdxf.entities.DXFObject

DXF type

'MLEADERSTYLE'

Factory function

ezdxf.document.Drawing.mleader_styles.new()

class ezdxf.entities.MLeaderStyle
dxf.align_space

unknown meaning

dxf.arrow_head_handle

handle of default arrow head, see also ezdxf.render.arrows module, by default no handle is set, which mean default arrow “closed filled”

dxf.arrow_head_size

default arrow head size in drawing units, default is 4.0

dxf.block_color

default block color as ;term:raw color value, default is BY_BLOCK_RAW_VALUE

dxf.block_connection_type

0

center extents

1

insertion point

dxf.block_record_handle

handle to block record of the BLOCK content, not set by default

dxf.block_rotation

default BLOCK rotation in radians, default is 0.0

dxf.block_scale_x

default block x-axis scale factor, default is 1.0

dxf.block_scale_y

default block y-axis scale factor, default is 1.0

dxf.block_scale_z

default block z-axis scale factor, default is 1.0

dxf.break_gap_size

default break gap size, default is 3.75

dxf.char_height

default MTEXT char height, default is 4.0

dxf.content_type

0

none

1

BLOCK

2

MTEXT

3

TOLERANCE

default is MTEXT (2)

dxf.default_text_content

default MTEXT content as string, default is “”

dxf.dogleg_length

default dogleg length, default is 8.0

dxf.draw_leader_order_type

unknown meaning

dxf.draw_mleader_order_type

unknown meaning

dxf.first_segment_angle_constraint

angle of fist leader segment in radians, default is 0.0

dxf.has_block_rotation
dxf.has_block_scaling
dxf.has_dogleg

default is 1

dxf.has_landing

default is 1

dxf.is_annotative

default is 0

dxf.landing_gap_size

default landing gap size, default is 2.0

dxf.leader_line_color

default leader line color as raw-color value, default is BY_BLOCK_RAW_VALUE

dxf.leader_linetype_handle

handle of default leader linetype

dxf.leader_lineweight

default leader lineweight, default is LINEWEIGHT_BYBLOCK

dxf.leader_type

0

invisible

1

straight line leader

2

spline leader

default is 1

dxf.max_leader_segments_points

max count of leader segments, default is 2

dxf.name

MLEADERSTYLE name

dxf.overwrite_property_value

unknown meaning

dxf.scale

overall scaling factor, default is 1.0

dxf.second_segment_angle_constraint

angle of fist leader segment in radians, default is 0.0

dxf.text_align_always_left

use always left side to attach leaders, default is 0

dxf.text_alignment_type

unknown meaning - its not the MTEXT attachment point!

dxf.text_angle_type

0

text angle is equal to last leader line segment angle

1

text is horizontal

2

text angle is equal to last leader line segment angle, but potentially rotated by 180 degrees so the right side is up for readability.

default is 1

dxf.text_attachment_direction

defines whether the leaders attach to the left & right of the content BLOCK/MTEXT or attach to the top & bottom:

0

horizontal - left & right of content

1

vertical - top & bottom of content

default is 0

dxf.text_bottom_attachment_type

9

center

10

overline and center

default is 9

dxf.text_color

default MTEXT color as raw-color value, default is BY_BLOCK_RAW_VALUE

dxf.text_left_attachment_type

0

top of top MTEXT line

1

middle of top MTEXT line

2

middle of whole MTEXT

3

middle of bottom MTEXT line

4

bottom of bottom MTEXT line

5

bottom of bottom MTEXT line & underline bottom MTEXT line

6

bottom of top MTEXT line & underline top MTEXT line

7

bottom of top MTEXT line

8

bottom of top MTEXT line & underline all MTEXT lines

dxf.text_right_attachment_type

0

top of top MTEXT line

1

middle of top MTEXT line

2

middle of whole MTEXT

3

middle of bottom MTEXT line

4

bottom of bottom MTEXT line

5

bottom of bottom MTEXT line & underline bottom MTEXT line

6

bottom of top MTEXT line & underline top MTEXT line

7

bottom of top MTEXT line

8

bottom of top MTEXT line & underline all MTEXT lines

dxf.text_style_handle

handle of the default MTEXT text style, not set by default, which means “Standard”

dxf.text_top_attachment_type

9

center

10

overline and center