← Inbox

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

Script file
C3DO-0782.cs
Target
261101 - 5491 Roswell Rd NE R2.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

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

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261101 - Project\261101 - 5491 Roswell Rd NE R2.dwg
Message
Executed C3DO-0782 (0 entities touched).
Entities
—
Duration
860 ms
Civil 3D
25.0.0.0

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.