← Inbox

C3D-CMDS · List registered tag/renumber commands error

Read-only: enumerates the commands actually registered in this Civil 3D instance and filters for RENUM / TAG / table-related names, to find the real renumber command instead of guessing.

Script file
C3D-CMDS.cs
Target
SS_BLOCK_22X17 · model space
Author
claude
Approved
yes · reviewer
Timeout
180s

C# payload

// READ-ONLY: list the commands REGISTERED IN THIS CIVIL 3D INSTANCE that relate to tags /
// renumbering / tables, so the real command name is read out of the product rather than guessed.
var hits = new List<string>();
var seen = new List<string>();

foreach (var grp in Autodesk.AutoCAD.Runtime.SystemObjects.DynamicLinker.GetLoadedModules())
{
    // nothing to enumerate here directly; commands come from the command table below
}

// The command table: every globally-registered command name.
var ct = Autodesk.AutoCAD.Internal.Utils.GetCommandNames(true, true, true, false);
Log("total registered commands: " + ct.Count);

foreach (string c in ct)
{
    var u = c.ToUpper();
    if (u.Contains("RENUM") || u.Contains("TAG") || (u.Contains("TABLE") && u.StartsWith("AECC")))
        hits.Add(c);
}
hits.Sort();
Log("=== commands matching RENUM / TAG / AECC*TABLE (" + hits.Count + ") ===");
foreach (var c in hits) Log("  " + c);

Result

Status
error
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\SS_BLOCK_22X17.dwg
Message
Compile error: (12,42): error CS0117: 'Utils' does not contain a definition for 'GetCommandNames'; (13,5): error CS0019: Operator '+' cannot be applied to operands of type 'string' and 'method group'
Entities
Duration
351 ms
Civil 3D
25.0.0.0

Notes

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

No notes yet.