← Inbox

C3D-0141 · READ-ONLY: find a text-along-curve command [CMD-SCAN-2] done

Lists loaded assemblies related to survey, express tools or land desktop, and reflects over every loaded type for CommandMethod attributes whose command name mentions TEXT, ARC, CURVE or LABEL, to find what creates an SdskCurvedText entity. Draws nothing.

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

C# payload

// READ-ONLY. Find a text-along-curve command. Runtime.Utils is not available in this host, so
// probe candidate command names directly: a defined command resolves via the "C:" lisp namespace
// or is reported by the ARX/DEFUN tables. Nothing is drawn.
Log("drawing: " + Db.Filename);

// Which arx/dbx modules are loaded - tells us if the Survey/curved-text module is present.
Log("=== loaded assemblies mentioning survey / express / land ===");
foreach (var asm in System.AppDomain.CurrentDomain.GetAssemblies()) {
    string n = asm.GetName().Name.ToUpper();
    if (n.IndexOf("SURVEY") >= 0 || n.IndexOf("EXPRESS") >= 0 || n.IndexOf("LAND") >= 0
        || n.IndexOf("SDSK") >= 0 || n.IndexOf("AECC") >= 0)
        Log("   " + asm.GetName().Name);
}

// Test whether specific commands EXIST by asking the editor to look them up.
// Ed.GetCommandVersion / command echo is not available; use the documented approach of
// checking the command name against the registered command table via reflection on the
// CommandClass attributes of loaded assemblies.
Log("");
Log("=== .NET-registered commands mentioning TEXT/ARC/CURVE/LABEL ===");
int n = 0;
foreach (var asm in System.AppDomain.CurrentDomain.GetAssemblies()) {
    System.Type[] ts;
    try { ts = asm.GetTypes(); } catch { continue; }
    foreach (var t in ts) {
        System.Reflection.MethodInfo[] ms2;
        try { ms2 = t.GetMethods(System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic
                                | System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Instance); }
        catch { continue; }
        foreach (var m in ms2) {
            object[] attrs;
            try { attrs = m.GetCustomAttributes(typeof(Autodesk.AutoCAD.Runtime.CommandMethodAttribute), false); }
            catch { continue; }
            foreach (var a in attrs) {
                var cma = a as Autodesk.AutoCAD.Runtime.CommandMethodAttribute;
                if (cma == null) continue;
                string g = cma.GlobalName.ToUpper();
                if (g.IndexOf("TEXT") >= 0 || g.IndexOf("ARC") >= 0 || g.IndexOf("CURV") >= 0 || g.IndexOf("LABEL") >= 0) {
                    n++;
                    Log("   " + cma.GlobalName + "   [" + asm.GetName().Name + "]");
                }
            }
        }
    }
}
Log("   matches: " + 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-0141 (0 entities touched).
Entities
Duration
2806 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
=== loaded assemblies mentioning survey / express / land ===
   System.Text.RegularExpressions
   System.Linq.Expressions
   AeccUiWindows
   AeccLogMgd
   AeccUiWindows.resources
   AeccDesktopConnectorWrapper
   AeccDynamo
   AeccDynamoCmd
   AeccPartPublishingWizard
   AeccPersona
   AeccMgdReverse
   AeccAdpMgd
   AeccDesktopConnector
   AeccUiMgd
   AeccDbMgd
   AeccDataShortcutMgd
   AeccContextTabRules
   AeccWindows
   AeccPressurePipesMgd
   AeccDesktopConnector.resources
   AeccHydroCalcsMgd

=== .NET-registered commands mentioning TEXT/ARC/CURVE/LABEL ===
   InputSearchOptions   [AcWindows]
   MAPLABEL2ANN   [ConvertText]
   MAPMTEXT2ANN   [ConvertText]
   MAPTEXT2ANN   [ConvertText]
   TBFeatureSearch   [Autodesk.Map.IM.FeatureSearch]
   TBFeatureSearchClose   [Autodesk.Map.IM.FeatureSearch]
   DefineLabelCommand   [AcMapRibbonWrapper]
   MAPCLASSICDRAWORDERTEXTONTOP   [Autodesk.Map.PrintLayout.UI]
   matches: 8

Notes

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

No notes yet.