acad-mtext

Installation
SKILL.md

AutoCAD Text (MText and DBText)

Use this skill when creating or modifying text objects - multiline text (MText), single-line text (DBText), text styles, and formatted text content.

MText Creation

using (Transaction tr = db.TransactionManager.StartTransaction())
{
    BlockTableRecord btr = (BlockTableRecord)tr.GetObject(
        db.CurrentSpaceId, OpenMode.ForWrite);

    MText mtext = new MText();
    mtext.Location = new Point3d(100, 200, 0);
    mtext.Width = 200.0;
    mtext.TextHeight = 2.5;
    mtext.Contents = "Line 1\\PLine 2";  // \\P = paragraph break
    mtext.Attachment = AttachmentPoint.TopLeft;
    mtext.TextStyleId = db.Textstyle;  // current text style
Installs
4
GitHub Stars
4
First Seen
May 15, 2026