C3D-0560 · Contour labels: no decimals 260711 R2 done
Set Surface Elevation precision P2 -> P0 in Existing Major Labels and Existing Minor Labels contour label styles.
C# payload
var cs=CivilDoc.Styles.LabelStyles.SurfaceLabelStyles.ContourLabelStyles;
foreach(string nm in new[]{"Existing Major Labels","Existing Minor Labels"}){
var st=(Autodesk.Civil.DatabaseServices.Styles.LabelStyle)Tx.GetObject(cs[nm],OpenMode.ForWrite);
foreach(ObjectId cid in st.GetComponents(Autodesk.Civil.DatabaseServices.Styles.LabelStyleComponentType.Text)){
var c=(Autodesk.Civil.DatabaseServices.Styles.LabelStyleTextComponent)Tx.GetObject(cid,OpenMode.ForWrite);
string old=c.Text.Contents.Value; string neu=old.Replace("Surface Elevation(Uft|P2|","Surface Elevation(Uft|P0|");
c.Text.Contents.Value=neu; Log(nm+": "+old+" -> "+c.Text.Contents.Value);
}
}
Ed.Regen();
Result
Log
Existing Major Labels: <[Surface Elevation(Uft|P2|RN|AP|Sn|OF)]> -> <[Surface Elevation(Uft|P0|RN|AP|Sn|OF)]> Existing Minor Labels: <[Surface Elevation(Uft|P2|RN|AP|Sn|OF)]> -> <[Surface Elevation(Uft|P0|RN|AP|Sn|OF)]>
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.