Class CadMLeaderStyleEditor
- Namespace
- OpenCAD2D
- Assembly
- OpenCAD2D.Core.dll
The edits of the multileader styles, as AutoCAD's Multileader Style Manager (MLEADERSTYLE) makes them: each one undo step through ApplyEdit(string, IReadOnlyList<CadEditRecord>, Action<CadEditScope>), refused where AutoCAD refuses it. A style changed gives its values to every multileader of it, but those a multileader has of its own.
public static class CadMLeaderStyleEditor
- Inheritance
-
CadMLeaderStyleEditor
- Inherited Members
Methods
- Add(CadDocument, string, string)
Adds a style, as New of the Multileader Style Manager: a copy of the settings of another (Start with), under a name no style of the drawing has, letters of either case the same; the dictionary ACAD_MLEADERSTYLE made where the drawing has none, and the named object dictionary first where the drawing was written without it. A copy of an annotative style is annotative, as AutoCAD's New starts from the style's Annotative box.
- AddStandard(CadDocument)
Adds the presenter's metric Standard where the drawing has no multileader style of that name, as AutoCAD's drawing always has it; one undo step, nothing where it has one.
- Apply(CadDocument, string, CadMLeaderStyleSettings)
Writes the settings into a style, as OK of the Modify Multileader Style dialog, and gives every multileader of the style its values, those it has of its own kept (a value that differed from the style's before). Nothing is written, and nothing refused, where they are the style's already.
- Current(DxfDatabase)
Gets the name of the current multileader style (CMLEADERSTYLE), as the dictionary spells it; Standard where the drawing names none it has.
- Delete(CadDocument, string)
Deletes a style, as Delete of the Multileader Style Manager: refused for Standard, the current style and a style a multileader is drawn in, as AutoCAD greys Delete for them.
- Find(DxfDatabase, string)
Gets the style of a name; null where the drawing has none.
- KeysOf(CadStylePart)
Gets the keys of the settings that set a part, in the order of the dialog: Leader Format, Leader Structure, Content, each in its rows' order.
- Measures(CadStyleSample, CadMLeaderStyleSettings, string)
Measures what a setting sets on the sample, as a callout: the arrowhead's size along the leader from its tip (
ArrowSize), the landing's length (LandingDistance), the gap from its end to the words (LandingGap), the height of the words (TextHeight) and the angle the first segment is held to (FirstSegmentAngle, an arc from the x axis), and, of a style that leaves the landing out, the ghost of the dogleg it would have (IncludeLanding). The points are in the drawing coordinates of the sample, so the lengths are the values times the style's scale; the label has the value as the dialog shows it.
- PartsOf(string)
Gets the parts of the sample a setting of the Modify Multileader Style dialog sets. The key is the name of the setting, as CadMLeaderStyleSettings names it (
ArrowSize,LandingGap), letters of either case the same. A setting of no part (the break size, annotative, the scale) gives none.
- PreviewSample(DxfDatabase, CadMLeaderStyleSettings)
Makes the sample multileader of the Manager's preview with its parts told apart: the drawing of Sample(DxfDatabase, CadMLeaderStyleSettings), its multileader broken into the entities it draws as (ExplodeBroken()) in model space, each with a handle of its own, the multileader erased. The parts follow the order the pieces come in: the content first, the words (Text) or the block (Block); then the dogleg of each leader (Landing); then each leader line (LeaderLine, a polyline or a spline) and its arrowhead (Arrow, a solid or the insert of its block).
- Rename(CadDocument, string, string)
Renames a style with the multileaders drawn in it, as -RENAME multileadeRstyle does: the entry of the dictionary ACAD_MLEADERSTYLE takes the new name, which the multileaders follow since they point at the style by its handle, and the current style (CMLEADERSTYLE) names it where it was the one renamed. Standard keeps its name.
- Sample(DxfDatabase, CadMLeaderStyleSettings)
Makes the sample multileader of the Manager's preview: a drawing of its own whose one style, Standard, has the settings (its text style Standard given the font of the one they name in the drawing edited, its leaders ByBlock), and a multileader of the words "Default Text" in it, its arrow at the origin and its landing 6 by 4 text heights up to the right, made as MLEADER makes one; with no landing where the settings leave it out (its dogleg not drawn, the leader line running on to the words).
- SetCurrent(CadDocument, string)
Makes a style current (CMLEADERSTYLE), as Set Current does, and gives MLEADERSCALE the style's scale, nought for an annotative style, as AutoCAD 2021 does each time the variable is set, to the style already current too: with MLEADERSCALE set to 2, a style of scale 5 made current gives 5 again. Refused where the drawing has no such style, or cannot hold the variables: a drawing with no CLASSES section to list DICTIONARYVAR in.
- Styles(DxfDatabase)
Gets the multileader styles of a drawing, by name, letters of either case alike first: the entries of its dictionary ACAD_MLEADERSTYLE that are styles; none where it has none.
- Uses(DxfDatabase, string)
Gets the handles of the multileaders drawn in a style: those of model space, the layouts and the blocks that name it, in the order of the blocks and their entities, as AutoCAD counts what keeps a style from being deleted.
- WhyNotDeleted(DxfDatabase, string)
Gets why a style may not be deleted, as Delete is greyed: Standard, the current style, a style a multileader uses; null where it may.