Table of Contents

Property MText

Namespace
GeometryHelper.Dxf
Assembly
GeometryHelper.dll

MText

Gets or sets the words, as AutoCAD's MText: a DxfMText in no file of the MTEXT of the context data, its words (304), place (12), direction (13), height (the context's 41), width (43), spacing of its lines (45 and 170), the point it is held by (171, at the top on the left, middle or right) and, in a drawing, its text style (340), by name; null where the MULTILEADER holds no words.

public DxfMText MText { get; set; }

Property Value

DxfMText

Set, an MTEXT whose words, place, direction, height, width, spacing and point are written into the context data, the height's bit of the overrides set; a MULTILEADER that held no words is given an MTEXT as ezdxf writes one, its block taken out with the handle of it (344), and its content type the words, with bit 10. The base point of the content (10 of the context data), where AutoCAD lands a leader it adds, is put where a leader from the left would meet the words, as AutoCAD 2021 puts it where no leader is landed yet (check D38b): the LandingGap short of the place given and as far below as the left's attachment says, which needs no font, "ABC" 4 high given at (100, 50, 0), met at the middle of the top line, putting it at (98, 48, 0), so that AutoCAD lands a leader from the left there and leaves the words. Words held at their top centre or right have their left edge at the place given, as AutoCAD 2021 puts them, and move along the plane by half their width or all of it where the drawing's fonts measure them: "ABC" of txt.shx held at the top right stand at (110.67, 50, 0); the context's alignment (176) is then theirs, with bits 14 and 26 where that changes it. Words turned in the plane turn it with them where no leader is landed yet, its x axis (111) their direction, as AutoCAD 2021 turns it: "ABC" turned half round make the x axis (-1, 0, 0), the base point at (102, 52, 0), and are met as words along the plane. Words given first to a MULTILEADER whose leaders are landed already move to meet the first on a side, as AutoCAD 2021 moves them: given at (100, 50, 0) to a line landed at (0, 0, 0), they stand at (10, 2, 0); on the right, where the fonts measure them. Null takes the words out, as ContentType set to none does. Words given anew where leaders meet them on a side keep their landing, as AutoCAD 2021 keeps it, the place given not taken: met on their left only, they stay where they were, moved up by as much more as the left is met below their top, three lines met at their middle given at (120, 80, 0) for "ABC" at (100, 50, 0) standing at (100, 56.67, 0); met on their right, they stay where they were where they are as wide as before, and take the place given where AutoCAD would land them by their font, but where the drawing's FontSearchPath measures them: met on the right alone, they move to keep that landing, "ABCDEF" of txt.shx given to "ABC" at (100, 50, 0) met from (120.67, 48, 0) standing at (88, 50, 0), the base point of the content at (86, 48, 0); met on both sides, as on the left, the leaders on the right landed anew. Given anew where no leader is landed, they take the place given, the base point put again with them. A leader meeting them on a side of attachment 8 underlines them (\L, TextAttachmentType). Given to a MULTILEADER in a drawing, the words' text style (TextStyleName, Standard where they name none) is the MULTILEADER's (343, and the words' 340), as AutoCAD 2021 takes it, with the bit of the overrides of the text style (11) where it was not the MULTILEADER's already: words of TS2 on a multileader of Standard's words make it of TS2, and a style set later leaves it so. Words given to a MULTILEADER in no drawing keep the text style they name when it is added to a drawing that has one of the name, with the bit where it is not the style's, as AutoCAD 2021 keeps the words of a multileader made in memory: words of TS2 make it of TS2; words that name none take its style's text style. Words given first in a text style other than the MULTILEADER's, where the drawing's fonts measure them in both, are moved to where its font would meet them, as AutoCAD 2021 moves them, so that a leader added is landed by that font (check D38): "Ag" of arial.ttf 4 high given at (100, 50, 0) to a multileader of txt.shx stand at (100, 49.92, 0), a leader from the left landed at (90, 47.33, 0). Their colour (Color) becomes the TextColor, with its bit of the overrides (15) but for BYBLOCK, and words given set bit 18, as AutoCAD 2021 writes them (check D38): words made in code, BYLAYER, make the text colour BYLAYER. Read, the words carry their colour of the index or true.

Exceptions

InvalidOperationException

Thrown when the MULTILEADER is erased.