C3D-TBRECON · Find title block attributes (read-only) done
Dump attributed blocks in layouts + model
C# payload
// Read-only: find attributed blocks (title block) in all layouts + model; dump tags + values.
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
void Dump(BlockTableRecord space, string where) {
foreach (ObjectId id in space) {
var o = Tx.GetObject(id, OpenMode.ForRead);
if (o is BlockReference br && br.AttributeCollection.Count > 0) {
var bn = ((BlockTableRecord)Tx.GetObject(br.IsDynamicBlock ? br.DynamicBlockTableRecord : br.BlockTableRecord, OpenMode.ForRead)).Name;
Log($"[{where}] '{bn}' h={br.Handle} ({br.AttributeCollection.Count} attrs):");
foreach (ObjectId aid in br.AttributeCollection) { var a = (AttributeReference)Tx.GetObject(aid, OpenMode.ForRead); Log($" {a.Tag} = \"{a.TextString}\""); }
}
}
}
Dump((BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForRead), "MODEL");
var ld = (DBDictionary)Tx.GetObject(Db.LayoutDictionaryId, OpenMode.ForRead);
foreach (DBDictionaryEntry de in ld) {
var lo = (Layout)Tx.GetObject(de.Value, OpenMode.ForRead);
if (lo.LayoutName == "Model") continue;
Dump((BlockTableRecord)Tx.GetObject(lo.BlockTableRecordId, OpenMode.ForRead), lo.LayoutName);
}
Log("Title-block recon complete (read-only).");
Result
Log
[11X17] 'SS_BLOCK_11X17' h=20355 (10 attrs):
JOB_NO = "JOB NO.: 251103"
SITE_ADDRESS = "2850 Riderwood Dr, Decatur, GA 30033, USA"
REF_DB_PG = "REF DB Page "
LAND_LOT = "LAND LOT: 147"
DISTRICT = "DISTRICT: 18th"
COUNTY = "COUNTY: Dekalb"
DATE = "DATE: 11/11/25"
SUBDIVISION_NAME_LOT = ""
PREP_FOR = "ANGELA & LLOYD BARNETT"
SURVEY_TYPE = "Survey"
Title-block recon complete (read-only).Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.