← Inbox

C3D-0445 · Reflect LabelStyle Copy/Export methods (read-only) done

List LabelStyle Copy*/Export* methods and LabelStyleCollection Add/Import signatures to find the cross-dwg style copy API.

Script file
C3D-0445.cs
Target
260711 - 281 Maranatha Trail.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var t = typeof(Autodesk.Civil.DatabaseServices.Styles.LabelStyle);
foreach (var m in t.GetMethods()) {
    if (m.Name.IndexOf("Copy",StringComparison.OrdinalIgnoreCase)>=0 || m.Name.IndexOf("Export",StringComparison.OrdinalIgnoreCase)>=0) {
        var ps=new System.Collections.Generic.List<string>();
        foreach (var p in m.GetParameters()) ps.Add(p.ParameterType.Name+" "+p.Name);
        Log(m.Name+"("+string.Join(", ",ps)+")");
    }
}
// also the collection Add signatures
var ct = typeof(Autodesk.Civil.DatabaseServices.Styles.LabelStyleCollection);
foreach (var m in ct.GetMethods()) {
    if (m.Name=="Add"||m.Name.IndexOf("Import",StringComparison.OrdinalIgnoreCase)>=0) {
        var ps=new System.Collections.Generic.List<string>();
        foreach (var p in m.GetParameters()) ps.Add(p.ParameterType.Name+" "+p.Name);
        Log("COLL."+m.Name+"("+string.Join(", ",ps)+")");
    }
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260711 - 281 Maranatha Trail, Lawrenceville, GA 30045, USA\260711 - 281 Maranatha Trail R2.dwg
Message
Executed C3D-0445 (0 entities touched).
Entities
Duration
447 ms
Civil 3D
25.0.0.0

Log

CopyAsSibling(String styleName)
ExportTo(Database destinationDatabase, StyleConflictResolverType conflictResolution)
CopyFrom(RXObject source)
COLL.Add(String name)

Notes

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

No notes yet.