Property MTextAttribute
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
MTextAttribute
Gets or sets the MTEXT the attribute is made of where it is of several lines, as AutoCAD's MTextAttribute.
public DxfMText MTextAttribute { get; set; }
Property Value
- DxfMText
Get, a new MTEXT in no file of the groups embedded in the attribute's record after its 101, with the attribute's look; null for an attribute of one line. Changing it changes nothing in the drawing until it is set back. An annotative one's is held, turned and attached as the MTEXT of the context it is read at says (Position), as tall as the attribute: AutoCAD 2021 gave the MTEXT of an attribute 2.5 high at the default 1:2 the height 1.25 (check D35b).
Set, as AutoCAD sets it and ezdxf's
set_mtextwrites it: the MTEXT's own groups embedded after a 101, those AutoCAD always writes put in where it has none (its location, height 2.5, width and box height nought, held at its top left, flowing by its style, the style Standard, single spacing at least); the text's part made to agree, its value the words of every line joined by spaces, as AutoCAD 2021 writes it (three linesLINE ONE,LINE TWOandLINE THREEgiveLINE ONE LINE TWO LINE THREE, where ezdxf writes the first line), its two points the MTEXT's location, its rotation the MTEXT's direction, its justification the MTEXT's attachment, its style and height the MTEXT's, its width factor, lean and mirroring taken out; its type (71) 2, of several lines. The attribute keeps its own look. The MTEXT it is made of, given back, changes nothing, and so does null given to an attribute of one line, which reads null.An annotative attribute is given the MTEXT in every context as AutoCAD 2021 gives it: each context's second point the MTEXT's location, its 290 made 1 and the MTEXT's own context embedded after it, of the context's default flag and scale, its attachment, direction, location, width and box, its extents nought; its record, where the context it is read at is not the default, keeping the default's point and angle and given the height at the default's scale (check D35b).
Exceptions
- ArgumentNullException
Thrown when null is set on an attribute of several lines: set IsMTextAttribute false to make it one of one line.
- ArgumentException
Thrown when the MTEXT's text style is not in the file's text style table.
- InvalidOperationException
Thrown when the attribute is erased, or set in a file older than R2018 (AC1032).