C3D-0158 · READ-ONLY: title block attributes in 260714 [TB-READ-260714] done
Lists every layout and every block reference carrying attributes with its current values, so stale data from a previous job can be spotted before the title block is filled for job 260714. No changes.
C# payload
// READ-ONLY. Title block attributes in this drawing, with their CURRENT values.
// The #1 hazard is stale template data carried from a previous job, so every value is dumped
// for comparison against the SurveyDisco card before anything is written. No changes.
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
Log("drawing: " + Db.Filename);
Log("");
Log("=== LAYOUTS ===");
var dict = (DBDictionary)Tx.GetObject(Db.LayoutDictionaryId, OpenMode.ForRead);
foreach (DBDictionaryEntry de in dict) {
var lay = (Layout)Tx.GetObject(de.Value, OpenMode.ForRead);
var btr = (BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId, OpenMode.ForRead);
int n = 0; foreach (ObjectId x in btr) n++;
Log(String.Format(" \"{0}\" tab={1} entities={2}", lay.LayoutName, lay.TabOrder, n));
}
Log("");
Log("=== BLOCKS WITH ATTRIBUTES ===");
foreach (ObjectId btrId in bt) {
var btr = (BlockTableRecord)Tx.GetObject(btrId, OpenMode.ForRead);
foreach (ObjectId id in btr) {
var br = Tx.GetObject(id, OpenMode.ForRead) as BlockReference;
if (br == null || br.AttributeCollection.Count == 0) continue;
Log("");
Log(" BLOCK \"" + br.Name + "\" [" + br.Handle + "] in " + btr.Name + " layer=" + br.Layer);
foreach (ObjectId aid in br.AttributeCollection) {
var at = Tx.GetObject(aid, OpenMode.ForRead) as AttributeReference;
if (at != null) Log(String.Format(" {0,-22} = \"{1}\"", at.Tag, at.TextString));
}
}
}
Result
Log
drawing: C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714 - 285 Huckaby Rd.dwg
=== LAYOUTS ===
"11X17" tab=1 entities=214
"HOUSEDIM" tab=2 entities=338
"Model" tab=0 entities=10
=== BLOCKS WITH ATTRIBUTES ===
BLOCK "SS_BLOCK_11X17" [20355] in *Paper_Space layer=BLOCK_TB2
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"Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.