Method SetFromStyle
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
SetFromStyle()
Gives the multileader the values of its multileader style and takes away its overrides of it, as AutoCAD's
SetFromStyle: the style's scale first, then its look of the leader lines, the landing, the dogleg, the arrows,
the words and the block, each written by the property of its name (Scale, LeaderLineType
... BlockConnectionType) in the multileader and its context data, its linetype (341) and text style
(343, and 340 of its words) by the style's handles; then its overrides (90) set to nought. A multileader of the style
Standard, its words 2.5 high of its own, has words 4 high, as the style. The sizes, unscaled in the style, are scaled
once by the scale the multileader then has: the height of the words, the landing gap and the size of the arrows of
the context data (41, 145 and 140) and each leader's length of the dogleg (40) are the style's times the scale, and
the multileader's own size of the arrows (42) and length of the doglegs (41) the style's, unscaled, as AutoCAD 2021
writes them; Standard scaled 2 gives words 8 high, a gap of 4, arrows 8 drawn (42 of 4) and doglegs 16 drawn (41 of 8). A value the style gives that the multileader
cannot take keeps the multileader's own and its bit: a content (172) or a block (344) it does not hold, a size or a type out of AutoCAD's range, a linetype or a text
style the style names none of or one its drawing has not, an arrow block or a block a copy in no drawing cannot be
given (it keeps its own arrow, and takes the rest), and the attachments of the top and bottom and their direction in a
file older than R2010; so do the bits of no property the library writes (18, 26 and 30). What it cannot take is judged
before anything is written, so that nothing is left half set. The overrides of each leader line (its 93) are the
multileader's own, not the style's, and stay. The words, the block and the landings stay where they are, the properties
written here not moving them as they do when set one by one: how AutoCAD 2021 moves them when a style is taken has not
been read.
public override bool SetFromStyle()
Returns
- bool
Whether the multileader names a multileader style of its drawing it is set from (for a copy in no file, of the drawing it was copied from); false, and nothing changed, where it names none, or has no context data to be drawn from.
Exceptions
- InvalidOperationException
Thrown when the multileader is erased and differs from its style.