← Inbox

C3D-0140 · READ-ONLY: find a text-along-curve command [CMD-SCAN] error

Enumerates every registered command group and command name in the live session, reporting those whose name mentions TEXT, ARC, CURV or LABEL, to find the command that creates an SdskCurvedText entity. Draws nothing.

Script file
C3D-0140.cs
Target
active document · model space
Author
claude
Approved
yes · reviewer
Timeout
240s

C# payload

// READ-ONLY. Enumerate every registered command whose name suggests text-on-a-curve, so the
// SdskCurvedText entity can be created via Ed.Command instead of the per-character workaround.
// Nothing is drawn.
Log("drawing: " + Db.Filename);

var hits = new List<string>();
int total = 0;
try {
    var groups = Autodesk.AutoCAD.Runtime.Utils.GetCommandGroups();
    foreach (string g in groups) {
        var cmds = Autodesk.AutoCAD.Runtime.Utils.GetCommandNames(g, true, false);
        foreach (string c in cmds) {
            total++;
            string u = c.ToUpper();
            if (u.IndexOf("TEXT") >= 0 || u.IndexOf("ARC") >= 0 || u.IndexOf("CURV") >= 0 || u.IndexOf("LABEL") >= 0)
                hits.Add(g + " : " + c);
        }
    }
} catch (System.Exception ex) { Log("GetCommandGroups: " + ex.Message); }

Log("commands scanned: " + total + "   matches: " + hits.Count);
hits.Sort();
foreach (var h in hits) Log("   " + h);

Result

Status
error
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260802 - 4082 Sweetbriar Ln, Forest Park, GA 30297, USA\260802 - 4082 Sweetbriar Ln.dwg
Message
Compile error: (9,18): error CS0234: The type or namespace name 'Utils' does not exist in the namespace 'Autodesk.AutoCAD.Runtime' (are you missing an assembly reference?); (11,20): error CS0234: The type or namespace name 'Utils' does not exist in the namespace 'Autodesk.AutoCAD.Runtime' (are you missing an assembly reference?)
Entities
Duration
349 ms
Civil 3D
25.0.0.0

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.