C3D-0633 · Replace old title-block flood note with R9 FLOOD NOTE error
SS_BLOCK_17X11 (both inserts): replace the old 'not located within a SFHA ... Zone X' flood note text 2109E with the R9 FLOOD NOTE (Tract 2 in 100-yr zone, MFFE 782.53) and blank the FIRM_PANEL / FIRM_DATE / FLOOD_ZONE attributes that completed the old sentence.
C# payload
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead); var def=(BlockTableRecord)Tx.GetObject(bt["SS_BLOCK_17X11"],OpenMode.ForRead);
ObjectId fid; Db.TryGetObjectId(new Handle(Convert.ToInt64("2109E",16)),out fid); var fm=(MText)Tx.GetObject(fid,OpenMode.ForWrite);
if(fm.OwnerId!=def.ObjectId){ Log("2109E is not in SS_BLOCK_17X11 - stopped"); return; }
string o=fm.Text; fm.Contents="FLOOD NOTE:\\PPER THE FAYETTE COUNTY 2013 LIMITED DETAILED FUTURE CONDITIONS FLOOD STUDY (DEWBERRY),\\PADOPTED BY SEC. 104-85(e)(2), PORTIONS OF TRACT 2 LIE WITHIN A 100-YEAR FLOOD ZONE. STUDY\\PLIMITS, CROSS SECTIONS AND MINIMUM FINISHED FLOOR ELEVATIONS ARE SHOWN HEREON. TRACT 2\\PMFFE = 782.53."; Log("SS_BLOCK_17X11 flood note: '"+o+"' -> '"+fm.Text.Replace("
"," / ")+"'");
foreach(ObjectId rid in def.GetBlockReferenceIds(true,false)){ var br=(BlockReference)Tx.GetObject(rid,OpenMode.ForWrite);
var own=(BlockTableRecord)Tx.GetObject(br.OwnerId,OpenMode.ForRead); string where=own.IsLayout?((Layout)Tx.GetObject(own.LayoutId,OpenMode.ForRead)).LayoutName:own.Name;
foreach(ObjectId a in br.AttributeCollection){ var ar=(AttributeReference)Tx.GetObject(a,OpenMode.ForWrite); if(ar.Tag=="FIRM_PANEL"||ar.Tag=="FIRM_DATE"||ar.Tag=="FLOOD_ZONE"){ Log(" ["+where+" h="+br.Handle+"] "+ar.Tag+": '"+ar.TextString+"' -> blank"); ar.TextString=""; } }
br.RecordGraphicsModified(true); }
Ed.Regen();
Result
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.