← Inbox

C3D-0138 · READ-ONLY: inspect SdskCurvedText [SDSK-CURVEDTEXT] done

SdskCurvedText is a registered runtime class in this session. Reports its RXClass details and parent, searches every loaded assembly for a managed wrapper type for curved or arc-aligned text, and checks whether any such entity already exists in the drawing. Draws nothing.

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

C# payload

// READ-ONLY. SdskCurvedText is registered in this session - find out whether a ticket can
// construct one: its managed wrapper type, assembly, and public members. Nothing is drawn.
Log("drawing: " + Db.Filename);

// where does the class come from?
try {
    var d = Autodesk.AutoCAD.Runtime.SystemObjects.ClassDictionary;
    foreach (System.Collections.DictionaryEntry de in d) {
        string nm = de.Key.ToString();
        if (nm != "SdskCurvedText") continue;
        var rc = de.Value as Autodesk.AutoCAD.Runtime.RXClass;
        Log("SdskCurvedText found");
        if (rc != null) {
            Log("   Name       " + rc.Name);
            try { Log("   DxfName    " + rc.DxfName); } catch { }
            try { Log("   AppName    " + rc.AppName); } catch { }
            try { Log("   MyParent   " + (rc.MyParent != null ? rc.MyParent.Name : "<null>")); } catch { }
        }
    }
} catch (System.Exception ex) { Log("lookup: " + ex.Message); }

// is there a managed .NET type for it in any loaded assembly?
Log("");
Log("=== managed types matching CurvedText / ArcText ===");
foreach (var asm in System.AppDomain.CurrentDomain.GetAssemblies()) {
    System.Type[] ts;
    try { ts = asm.GetTypes(); } catch { continue; }
    foreach (var t in ts) {
        string n = t.Name;
        if (n.IndexOf("CurvedText", System.StringComparison.OrdinalIgnoreCase) >= 0
         || n.IndexOf("ArcText", System.StringComparison.OrdinalIgnoreCase) >= 0
         || n.IndexOf("ArcAligned", System.StringComparison.OrdinalIgnoreCase) >= 0) {
            Log("   " + t.FullName + "   [" + asm.GetName().Name + "]");
        }
    }
}

// does any Civil label style do text-on-curve for us?
Log("");
Log("=== existing entities of that class in the drawing ===");
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
int n = 0;
foreach (ObjectId id in ms) {
    Autodesk.AutoCAD.DatabaseServices.DBObject o;
    try { o = Tx.GetObject(id, OpenMode.ForRead); } catch { continue; }
    string tn = o.GetType().Name;
    if (tn.IndexOf("Curved", System.StringComparison.OrdinalIgnoreCase) >= 0) { n++; Log("   [" + o.Handle + "] " + o.GetType().FullName); }
}
Log("   count: " + n);

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260802 - 4082 Sweetbriar Ln, Forest Park, GA 30297, USA\260802 - 4082 Sweetbriar Ln.dwg
Message
Executed C3D-0138 (0 entities touched).
Entities
Duration
3114 ms
Civil 3D
25.0.0.0

Log

drawing: C:\Users\sanja\OneDrive\_SurveyDisco\260802 - 4082 Sweetbriar Ln, Forest Park, GA 30297, USA\260802 - 4082 Sweetbriar Ln.dwg
SdskCurvedText found
   Name       SdskCurvedText
   DxfName    SDSK_CURVEDTEXT
   AppName    SDSK
   MyParent   AcDbEntity

=== managed types matching CurvedText / ArcText ===

=== existing entities of that class in the drawing ===
   count: 0

Notes

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

No notes yet.