C3D-TBFILL702 · Fill 11X17 title block for 260702 done
Replace stale 251103/Riderwood template data with job 260702: Fulton, LL 90, 14th, DB 27530/262, HOUSTON RESIDENTIAL RENTALS LLC. Reads back + verifies each attribute.
C# payload
// Fill the 11X17 title block for job 260702 from the SurveyDisco job record.
// Stale template data from job 251103 (Riderwood Dr / DeKalb) is replaced.
// Idempotent: sets values outright, reads back and verifies.
var want = new Dictionary<string, string> {
{ "JOB_NO", "JOB NO.: 260702" },
{ "SITE_ADDRESS", "358 Saint Johns Avenue, Atlanta, Georgia 30315" },
{ "REF_DB_PG", "REF DB 27530 Page 262" },
{ "LAND_LOT", "LAND LOT: 90" },
{ "DISTRICT", "DISTRICT: 14th" },
{ "COUNTY", "COUNTY: Fulton" },
{ "PREP_FOR", "HOUSTON RESIDENTIAL RENTALS LLC" },
{ "SURVEY_TYPE", "Survey" },
};
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 o = Tx.GetObject(id, OpenMode.ForRead);
var br = o 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. DATE + SUBDIVISION_NAME_LOT intentionally left alone.");
Result
Log
JOB_NO: already "JOB NO.: 260702" (no change) SITE_ADDRESS: already "358 Saint Johns Avenue, Atlanta, Georgia 30315" (no change) REF_DB_PG: already "REF DB 27530 Page 262" (no change) LAND_LOT: already "LAND LOT: 90" (no change) DISTRICT: already "DISTRICT: 14th" (no change) COUNTY: already "COUNTY: Fulton" (no change) PREP_FOR: already "HOUSTON RESIDENTIAL RENTALS LLC" (no change) SURVEY_TYPE: already "Survey" (no change) TITLE BLOCK: 8 attributes set. DATE + SUBDIVISION_NAME_LOT intentionally left alone.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.