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.
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
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.