Method Explode
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
Explode()
Gets the entities the multileader breaks into, as AutoCAD 2021's Explode gives them from its context data: its
content first, an MTEXT of its words (MText, as wide as the context data says, which the scale has
scaled already, as AutoCAD 2021 writes it, in its text style and colour) or an INSERT of its block
(BlockContent at BlockPosition, scaled, turned and coloured so, its attributes given the
values the multileader holds), either in the multileader's own linetype and lineweight, as AutoCAD 2021 gives them;
then, leader by leader, its dogleg, a LINE from the last point of the leader along its direction, of no length where
the dogleg has none, as AutoCAD 2021 draws it, where the multileader has one, its leader lines are not splined and
the leader runs left or right of the words, a leader of no line giving its dogleg alone and one of no landing yet
(AddLeader()) nothing, as AutoCAD 2021 draws them; then line by line, unless the line is invisible, an LWPOLYLINE
through the vertices to the last point of the leader, and the arrowhead at the first vertex. A splined line is one
SPLINE fitted through the same points, leaving along its first segment and reaching along its dogleg, its knots the
lengths of the chords, as AutoCAD's. Without a dogleg, a line on the left or right of the words runs on to the end the
dogleg would have; so does every line of a multileader whose leader lines are splined (LeaderLineType),
which AutoCAD 2021 draws with no dogleg: two lines splined from (0, 0) and (0, 100) to a dogleg from (90, 48) to
(98, 48) give two SPLINEs fitted from the backs of their arrows to (98, 48) and no LINE. The arrowhead is drawn where
the first segment is more than twice as long as the arrow, as AutoCAD draws it: an INSERT of the line's or the
multileader's arrow block, turned to point away from the line, by an angle from nought to a whole turn, and scaled to
the arrow's size, or AutoCAD's closed filled arrow as a SOLID a third as wide as long, its corners the one on the
right of the line, the tip and the one on its left; the line then starts at the back of the arrow. Each part is on
the multileader's layer, and a colour of BYBLOCK, as the style Standard gives the words and the lines, is the
multileader's own colour, as AutoCAD 2021 gives it; the arrowhead has the multileader's own linetype, and the SOLID its
own lineweight, the INSERT the lineweight of its line, as AutoCAD 2021 gives them: a multileader of lineweight 0.30
and linetype Continuous of its own, its leader lines 0.50, gives a SOLID of 0.30 or an INSERT of 0.50, both
Continuous.
A line is drawn with the type, colour, linetype, lineweight and arrow size of its own where its flags (93) say it has
them, BYBLOCK among them, and its colour where it has no flags and its colour is not BYBLOCK, as ezdxf writes one;
else with the multileader's (GetLeaderLineType(int), GetLeaderLineColor(int),
GetLeaderLineWeight(int)): a line splined of its own is one SPLINE among the straight lines of the others, one
invisible of its own gives nothing, and a line of arrows 2 of its own under arrows 4 starts 2 from its tip; a size of
its own is unscaled, as the multileader's own (42), and drawn times the scale of the context data, 4 at a scale of 2,
where a line of none is drawn with the size of the context data (140). The words on the right of two leader lines
with a dogleg of 8 give an MTEXT, the dogleg's LINE, and for each line an LWPOLYLINE and a SOLID. A multileader scaled
to nothing gives nothing. The lines AutoCAD draws under or over the words, as long as the words are wide, are
AutoCAD's to work out from its fonts, and are not among them. A copy in no file, made
by Clone(), finds the blocks, the linetype and the text style its record names in the drawing it
was copied from, as a dimension's copy finds its block, and gives what the original gives, the values of its attributes
among it; where that drawing has erased a block it names since, it is refused, rather than drawn without it.
public override IReadOnlyList<DxfEntity> Explode()
Returns
- IReadOnlyList<DxfEntity>
The entities, in no file, to be added to a drawing by AppendEntity(DxfEntity).
Exceptions
- InvalidOperationException
Thrown when the multileader has no context data, which AutoCAD draws it from; or is a copy in no file whose content or arrows are a block the drawing it was copied from has erased since, the handle of the block said.