C3DO-0782 · 261101: east/west bearings with leading zero [C3D-EWZERO] done
Override the Bearing text on parcel segment labels 2185B (west) -> N01° 23' 10"W and 2185D (east) -> S00° 03' 23"E. Distance unchanged. Reversible (reset override).
C# payload
string D=((char)176).ToString();
var want=new Dictionary<string,string>{ {"2185B","N01"+D+" 23' 10\"W"}, {"2185D","S00"+D+" 03' 23\"E"} };
foreach(var kv in want){ ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64(kv.Key,16)),out id);
var l=(Autodesk.Civil.DatabaseServices.Label)Tx.GetObject(id,OpenMode.ForWrite);
var st=(Autodesk.Civil.DatabaseServices.Styles.LabelStyle)Tx.GetObject(l.StyleId,OpenMode.ForRead);
foreach(ObjectId cid in st.GetComponents(Autodesk.Civil.DatabaseServices.Styles.LabelStyleComponentType.Text)){
var c=(Autodesk.Civil.DatabaseServices.Styles.LabelStyleTextComponent)Tx.GetObject(cid,OpenMode.ForRead);
if(c.Name!="Bearing") continue;
string old=l.GetTextComponentOverride(cid);
l.SetTextComponentOverride(cid,kv.Value);
string now=l.GetTextComponentOverride(cid);
Log(kv.Key+" Bearing: \""+old+"\" -> \""+now+"\""+(now==kv.Value?" (verified)":" (MISMATCH)")); } }
Ed.Regen();
Result
Log
2185B Bearing: "<[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]>" -> "N01° 23' 10"W" (verified) 2185D Bearing: "<[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]>" -> "S00° 03' 23"E" (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.