C3D-0533 · 260711 22x17: fill title block + flood note + topo note [C3D-0534] done
Fill SS_BLOCK_22X17 attrs on 22x17 from surveydisco 260711 (date today), fix stale flood note panel to 13135C0104F eff 9/29/2006 Zone X, add topo note under the field closure note.
C# payload
var map=new System.Collections.Generic.Dictionary<string,string>();
map["JOB_NO"]="JOB NO.: 260711";
map["SITE_ADDRESS"]="281 Maranatha Trail, Lawrenceville, GA 30045";
map["REF_DB_PG"]="";
map["LAND_LOT"]="LAND LOT: 151";
map["DISTRICT"]="DISTRICT: 5TH";
map["COUNTY"]="COUNTY: GWINNETT";
map["DATE"]="DATE: 10/13/26";
map["SUBDIVISION_NAME_LOT"]="FOX RUN ESTATES UNIT 2 LOT 10 BLOCK \"C\"";
map["PREP_FOR"]="REYES AUTOS TRUCKS LLC";
map["SURVEY_TYPE"]="EXEMPTION PLAT";
map["FIRM_PANEL"]="13135C0104F";
map["FIRM_DATE"]="SEPTEMBER 29, 2006";
map["FLOOD_ZONE"]="X";
var lmgr=LayoutManager.Current; var lay=(Layout)Tx.GetObject(lmgr.GetLayoutId("22x17"),OpenMode.ForRead);
var ps=(BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId,OpenMode.ForWrite);
int changed=0;
foreach(ObjectId eid in ps){ if(eid.IsErased) continue; var br=Tx.GetObject(eid,OpenMode.ForRead) as BlockReference; if(br==null) continue; var bd=(BlockTableRecord)Tx.GetObject(br.BlockTableRecord,OpenMode.ForRead); if(bd.Name!="SS_BLOCK_22X17") continue;
foreach(ObjectId aid in br.AttributeCollection){ var ar=(AttributeReference)Tx.GetObject(aid,OpenMode.ForWrite); if(!map.ContainsKey(ar.Tag)) continue; string old=ar.TextString; ar.TextString=map[ar.Tag]; changed++; Log(ar.Tag+": '"+old+"' -> '"+ar.TextString+"'"); } }
Log("title block attrs changed="+changed);
// flood note
ObjectId fid; Db.TryGetObjectId(new Handle(Convert.ToInt64("158B4",16)),out fid);
var fm=(MText)Tx.GetObject(fid,OpenMode.ForWrite); string fo=fm.Contents;
string fn=fo.Replace("13121C0338F, EFFECTIVE SEPTEMBER 18, 2013.","13135C0104F, EFFECTIVE SEPTEMBER 29, 2006, AND LIES IN ZONE X.");
if(fn==fo) Log("FLOOD NOTE: pattern not found, left as-is"); else { fm.Contents=fn; Log("FLOOD NOTE -> "+fm.Contents); }
// topo note, styled like the field closure note 158F4, placed just under it
ObjectId cid; Db.TryGetObjectId(new Handle(Convert.ToInt64("158F4",16)),out cid);
var cm=(MText)Tx.GetObject(cid,OpenMode.ForRead);
bool exists=false; foreach(ObjectId eid in ps){ if(eid.IsErased) continue; var m=Tx.GetObject(eid,OpenMode.ForRead) as MText; if(m!=null && m.Contents.Contains("TOPOGRAPHY IS BASED ON FIELD RUN DATA")) exists=true; }
if(exists) Log("topo note already present, skipped");
else {
var t=new MText(); t.SetDatabaseDefaults();
t.TextStyleId=cm.TextStyleId; t.TextHeight=cm.TextHeight; t.Width=cm.Width; t.Attachment=AttachmentPoint.TopLeft;
t.LineSpacingFactor=cm.LineSpacingFactor; t.Layer=cm.Layer; t.Color=cm.Color;
var ce=cm.GeometricExtents; t.Location=new Point3d(cm.Location.X, ce.MinPoint.Y-0.12, 0);
t.Contents="TOPOGRAPHY IS BASED ON FIELD RUN DATA BY SAWHNEY & ASSOCIATES ON SEPTEMBER 10TH, 2026";
ps.AppendEntity(t); Tx.AddNewlyCreatedDBObject(t,true);
var te=t.GeometricExtents; Log("topo note h="+t.Handle+" ["+t.Layer+"] ext "+te.MinPoint.X.ToString("F2")+","+te.MinPoint.Y.ToString("F2")+" -> "+te.MaxPoint.X.ToString("F2")+","+te.MaxPoint.Y.ToString("F2"));
}
Ed.Regen();
Result
Log
JOB_NO: 'JOB NO.: 251002' -> 'JOB NO.: 260711' SITE_ADDRESS: 'SITE_ADDRESS' -> '281 Maranatha Trail, Lawrenceville, GA 30045' REF_DB_PG: 'REF DB xxx Page xxx' -> '' LAND_LOT: 'LAND LOT: ###' -> 'LAND LOT: 151' DISTRICT: 'DISTRICT: #TH' -> 'DISTRICT: 5TH' COUNTY: 'COUNTY: CLAYCO' -> 'COUNTY: GWINNETT' DATE: 'DATE: 10/16/25' -> 'DATE: 10/13/26' SUBDIVISION_NAME_LOT: 'SUBDIVISION_NAME LOT ##' -> 'FOX RUN ESTATES UNIT 2 LOT 10 BLOCK "C"' PREP_FOR: 'PREP_FOR' -> 'REYES AUTOS TRUCKS LLC' SURVEY_TYPE: 'BOUNDARY SURVEY' -> 'EXEMPTION PLAT' FIRM_PANEL: '13135C0016G' -> '13135C0104F' FIRM_DATE: 'FEBRUARY 4, 2013' -> 'SEPTEMBER 29, 2006' FLOOD_ZONE: 'X' -> 'X' title block attrs changed=13 FLOOD NOTE -> FLOOD NOTE:\PTHIS PROPERTY IS NOT LOCATED WITHIN A SPECIAL FLOOD HAZARD AREA (SFHA) AS SHOWN ON F.I.R.M. COMMUNITY PANEL NO. 13135C0104F, EFFECTIVE SEPTEMBER 29, 2006, AND LIES IN ZONE X. topo note h=159B2 [BLOCK_CLOSURE] ext 9.56,3.10 -> 12.42,3.45
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.