C3D-0077 · Set the A14 to A12 slope label to 2.81% [SLOPE-A14-A12] done
Rewrites the N/A slope label on line 2EC87 (A14 to A12) to 2.81% from the segment table, targeted by handle 2EF5E and verified before writing.
C# payload
// Set the A14 -> A12 slope label (line 2EC87) to 2.81% from the user's segment table (7001->7002).
// Targeted by handle 2EF5E, verified to be the N/A label on SEWER_LINE_TEXT before writing.
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
MText t = null;
foreach (ObjectId id in ms) {
var o = Tx.GetObject(id, OpenMode.ForRead);
if (o.Handle.ToString() == "2EF5E") { t = o as MText; break; }
}
if (t == null) { Log("ABORT: 2EF5E not found"); return; }
if (t.Layer != "SEWER_LINE_TEXT") { Log("ABORT: 2EF5E is on " + t.Layer); return; }
string was = t.Contents.Trim();
var w = (MText)Tx.GetObject(t.ObjectId, OpenMode.ForWrite);
w.Contents = "2.81%";
Log(" [2EF5E] A14->A12 slope " + was + " -> 2.81%");
int na = 0;
foreach (ObjectId id in ms) {
var mt = Tx.GetObject(id, OpenMode.ForRead) as MText;
if (mt != null && mt.Layer == "SEWER_LINE_TEXT" && mt.Contents.Trim() == "N/A") na++;
}
Log("N/A labels remaining on SEWER_LINE_TEXT: " + na + " (verified)");
Ed.Regen();
Result
Log
[2EF5E] A14->A12 slope N/A -> 2.81% N/A labels remaining on SEWER_LINE_TEXT: 0 (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.