C3D-FEMA702 · FEMA flood note (Zone X, panel 13121C0359F) done
Place the FEMA note 0d horizontal below the lot. Idempotency-guarded against double-stamping.
C# payload
// FEMA flood note for 260702. Zone X / FIRM panel 13121C0359F eff. 09/18/2013 (per job record).
// Rules applied: area/table/note blocks are 0 DEGREES HORIZONTAL (not rotated to the lot frame).
// Idempotency guard: bail if this note text is already present (the 260702 notes cook double-stamped).
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
var ms = (BlockTableRecord)Tx.GetObject(bt[BlockTableRecord.ModelSpace], OpenMode.ForWrite);
const string TAGLINE = "FLOOD NOTE";
foreach (ObjectId id in ms) {
var ex = Tx.GetObject(id, OpenMode.ForRead) as MText;
if (ex != null && ex.Contents.Contains(TAGLINE)) { Log("FEMA note already present — skipping (idempotent)."); return; }
}
// locate the boundary to anchor the note near the lot without landing inside it
Polyline bnd = null;
foreach (ObjectId id in ms) {
var e = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e is Polyline p && p.Closed && p.Layer == "C-PROP-LINE" && p.NumberOfVertices == 4 && System.Math.Abs(p.Area - 10212) < 800) { bnd = p; break; }
}
if (bnd == null) { Log("boundary not found"); return; }
var ext = bnd.GeometricExtents;
EnsureLayer("C-ANNO");
string txt = TAGLINE + "\\PBY GRAPHIC PLOTTING ONLY, THIS PROPERTY LIES IN ZONE \"X\"\\P"
+ "(AREA OF MINIMAL FLOOD HAZARD) AS SHOWN ON F.I.R.M.\\P"
+ "COMMUNITY PANEL No. 13121C0359F, EFFECTIVE DATE 09/18/2013.\\P"
+ "NO FIELD SURVEYING WAS PERFORMED TO DETERMINE THIS ZONE.";
var mt = new MText {
Location = new Point3d(ext.MinPoint.X, ext.MinPoint.Y - 40, 0),
Contents = txt,
TextHeight = 3.0,
Rotation = 0.0, // 0d horizontal — note block, per user rule
Attachment = AttachmentPoint.TopLeft,
Width = 120
};
mt.Layer = "C-ANNO";
ms.AppendEntity(mt); Tx.AddNewlyCreatedDBObject(mt, true);
Log($"FEMA note placed at ({mt.Location.X:F2},{mt.Location.Y:F2}) h=3.0 rot=0 (verified) — Zone X, panel 13121C0359F, eff 09/18/2013.");
Result
Log
FEMA note placed at (2225318.19,1345978.10) h=3.0 rot=0 (verified) — Zone X, panel 13121C0359F, eff 09/18/2013.
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.