C3D-0700 · 261101 title block from SurveyDisco [C3D-TB261101] done
Replaces the stale 251103 (2850 Riderwood Dr) title-block attributes on the 11X17 layout with job 261101 from the SurveyDisco card: 5491 Roswell Rd NE, Sandy Springs; DB 69685/361; LL 91, 17th district, Fulton; client Sanford Gerber; ALTA/NSPS LAND TITLE SURVEY; FIRM 13121C0144F 9/18/2013 zone X; date = points file date 11/09/26. Long attributes are squeezed to fit their cell. Also fixes the stale panel in the off-sheet flood MText 158D1.
C# payload
var want=new System.Collections.Generic.Dictionary<string,string>{
{"JOB_NO","JOB NO.: 261101"},
{"SITE_ADDRESS","5491 Roswell Rd NE, Sandy Springs, GA 30342"},
{"REF_DB_PG","REF DB 69685 Page 361"},
{"LAND_LOT","LAND LOT: 91"},
{"DISTRICT","DISTRICT: 17th"},
{"COUNTY","COUNTY: Fulton"},
{"DATE","DATE: 11/09/26"},
{"SUBDIVISION_NAME_LOT",""},
{"PREP_FOR","SANFORD GERBER"},
{"SURVEY_TYPE","ALTA/NSPS LAND TITLE SURVEY"},
{"FIRM_PANEL","13121C0144F,"},
{"FIRM_DATE","EFFECTIVE SEPTEMBER 18, 2013,"},
{"FLOOD_ZONE","AND LIES IN ZONE X"}};
// right-hand limit (paper inches) per attribute cell; text past it is squeezed with WidthFactor
var limit=new System.Collections.Generic.Dictionary<string,double>{{"SURVEY_TYPE",7.67},{"SITE_ADDRESS",3.10},{"REF_DB_PG",3.10},{"PREP_FOR",3.10},{"LAND_LOT",5.22},{"DISTRICT",5.22},{"COUNTY",5.22}};
var ld=(DBDictionary)Tx.GetObject(Db.LayoutDictionaryId,OpenMode.ForRead);
var lo=(Layout)Tx.GetObject(ld.GetAt("11X17"),OpenMode.ForRead);
var ps=(BlockTableRecord)Tx.GetObject(lo.BlockTableRecordId,OpenMode.ForRead);
int changed=0;
foreach(ObjectId id in ps){
var o=Tx.GetObject(id,OpenMode.ForRead);
var br=o as BlockReference;
if(br!=null&&br.Name=="SS_BLOCK_11X17"){
foreach(ObjectId aid in br.AttributeCollection){
var a=(AttributeReference)Tx.GetObject(aid,OpenMode.ForWrite);
if(!want.ContainsKey(a.Tag)) continue;
string old=a.TextString;
if(old!=want[a.Tag]){ a.TextString=want[a.Tag]; changed++; }
if(limit.ContainsKey(a.Tag)&&a.TextString.Length>0){
a.AdjustAlignment(Db);
var ex=a.GeometricExtents;
if(ex.MaxPoint.X>limit[a.Tag]){ double f=(limit[a.Tag]-ex.MinPoint.X)/(ex.MaxPoint.X-ex.MinPoint.X); a.WidthFactor=a.WidthFactor*f; a.AdjustAlignment(Db); Log(" "+a.Tag+" squeezed to width factor "+a.WidthFactor.ToString("F3")); }
}
var ex2=a.TextString.Length>0?a.GeometricExtents:new Extents3d();
Log(a.Tag+": '"+old+"' -> '"+a.TextString+"'"+(a.TextString.Length>0?" x "+ex2.MinPoint.X.ToString("F2")+"-"+ex2.MaxPoint.X.ToString("F2"):""));
}
}
var mt=o as MText;
if(mt!=null&&mt.Handle.ToString()=="158D1"){
string c=mt.Contents;
string n=c.Replace("13135C0016G","13121C0144F").Replace("FEBRUARY 4, 2013","SEPTEMBER 18, 2013");
if(n!=c){ mt.UpgradeOpen(); mt.Contents=n; changed++; Log("flood note MText 158D1 (paper, off-sheet): panel 13135C0016G -> 13121C0144F, FEBRUARY 4, 2013 -> SEPTEMBER 18, 2013"); }
}
}
// verify by re-reading
foreach(ObjectId id in ps){ var br=Tx.GetObject(id,OpenMode.ForRead) as BlockReference; if(br==null||br.Name!="SS_BLOCK_11X17") continue;
foreach(ObjectId aid in br.AttributeCollection){ var a=(AttributeReference)Tx.GetObject(aid,OpenMode.ForRead); if(want.ContainsKey(a.Tag)&&a.TextString!=want[a.Tag]) Log("VERIFY FAILED "+a.Tag); } }
Log("changed "+changed+" (verified)");
Ed.Regen();
Result
Log
flood note MText 158D1 (paper, off-sheet): panel 13135C0016G -> 13121C0144F, FEBRUARY 4, 2013 -> SEPTEMBER 18, 2013 JOB_NO: 'JOB NO.: 251103' -> 'JOB NO.: 261101' x 5.72-7.18 SITE_ADDRESS squeezed to width factor 0.567 SITE_ADDRESS: '2850 Riderwood Dr, Decatur, GA 30033, USA' -> '5491 Roswell Rd NE, Sandy Springs, GA 30342' x 0.68-3.10 REF_DB_PG: 'REF DB Page ' -> 'REF DB 69685 Page 361' x 0.68-2.89 LAND_LOT: 'LAND LOT: 147' -> 'LAND LOT: 91' x 3.19-4.40 DISTRICT: 'DISTRICT: 18th' -> 'DISTRICT: 17th' x 3.19-4.47 COUNTY: 'COUNTY: Dekalb' -> 'COUNTY: Fulton' x 3.19-4.57 DATE: 'DATE: 11/11/25' -> 'DATE: 11/09/26' x 5.74-7.20 SUBDIVISION_NAME_LOT: '' -> '' PREP_FOR: 'ANGELA & LLOYD BARNETT' -> 'SANFORD GERBER' x 0.75-2.86 SURVEY_TYPE: 'Survey' -> 'ALTA/NSPS LAND TITLE SURVEY' x 0.64-5.82 FIRM_PANEL: '13135C0016G,' -> '13121C0144F,' x 7.72-8.26 FIRM_DATE: 'EFFECTIVE FEBRUARY 4, 2013,' -> 'EFFECTIVE SEPTEMBER 18, 2013,' x 8.33-9.70 FLOOD_ZONE: 'AND LIES IN ZONE X' -> 'AND LIES IN ZONE X' x 9.68-10.55 changed 12 (verified)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.