C3D-RWTXT · Road label + (R/W VARIES) done
Add R/W note to Stonewall Tell road text
C# payload
// Road text rule: road name + R/W note. Update the Stonewall Tell label to add "(R/W VARIES)".
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead);
int n = 0;
foreach (ObjectId id in ms) {
if (Tx.GetObject(id, OpenMode.ForRead) is MText m && (m.Contents ?? "").ToUpperInvariant().Contains("STONEWALL")) {
var w = (MText)Tx.GetObject(id, OpenMode.ForWrite);
w.Contents = "STONEWALL TELL ROAD\\P(R/W VARIES)";
n++;
Log($"updated road label h={m.Handle}");
}
}
Log($"road labels updated: {n}");
Result
Log
updated road label h=20B9B road labels updated: 1
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.