C3D-TBDATE · Title block: DATE 07/16/26 + SUBDIVISION Lakewood Heights done
DATE from the point data file 358 HOUSE.txt (modified 07/16/26). SUBDIVISION_NAME_LOT = Lakewood Heights (neighborhood per job record); no lot number known, left off. Reads back + verifies; idempotent.
C# payload
// Finish the 260702 title block: DATE from the point-data file (358 HOUSE.txt, 07/16/26)
// and SUBDIVISION_NAME_LOT = neighborhood (Lakewood Heights); no lot number known.
var want = new Dictionary<string, string> {
{ "DATE", "DATE: 07/16/26" },
{ "SUBDIVISION_NAME_LOT", "Lakewood Heights" },
};
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
int hits = 0;
foreach (ObjectId btrId in bt) {
var btr = (BlockTableRecord)Tx.GetObject(btrId, OpenMode.ForRead);
if (!btr.IsLayout) continue;
foreach (ObjectId id in btr) {
var br = Tx.GetObject(id, OpenMode.ForRead) as BlockReference;
if (br == null || br.AttributeCollection == null || br.AttributeCollection.Count == 0) continue;
var def = (BlockTableRecord)Tx.GetObject(br.DynamicBlockTableRecord, OpenMode.ForRead);
if (def.Name != "SS_BLOCK_11X17") continue;
foreach (ObjectId aid in br.AttributeCollection) {
var ar = (AttributeReference)Tx.GetObject(aid, OpenMode.ForWrite);
if (!want.ContainsKey(ar.Tag)) continue;
string oldv = ar.TextString, newv = want[ar.Tag];
if (oldv == newv) { Log($"{ar.Tag}: already \"{newv}\" (no change)"); hits++; continue; }
ar.TextString = newv;
var chk = (AttributeReference)Tx.GetObject(aid, OpenMode.ForRead);
Log($"{ar.Tag}: \"{oldv}\" -> \"{chk.TextString}\" (verified)");
hits++;
}
}
}
Log($"TITLE BLOCK: {hits} attributes set.");
Result
Log
DATE: "DATE: 11/11/25" -> "DATE: 07/16/26" (verified) SUBDIVISION_NAME_LOT: "" -> "Lakewood Heights" (verified) TITLE BLOCK: 2 attributes set.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.