← Inbox

C3D-0164 · READ-ONLY: exact raw flood note text [FEMA-RAW] done

Emits the flood note MText contents completely unmodified, with its handle, owning block, layer, height, width, location, attachment and text style, so the panel number, date and zone can be split into attributes without altering the sentence. No changes.

Script file
C3D-0164.cs
Target
active document · paper space
Author
claude
Approved
yes · reviewer
Timeout
240s

C# payload

// READ-ONLY. The flood note's EXACT raw string, character-safe. The previous read mangled it
// (a bad escape stripped every P), so this emits the contents unmodified plus a char dump of the
// panel/date/zone region, and reports where the note lives so it can be split into attributes.
var bt = (BlockTable)Tx.GetObject(Db.BlockTableId, OpenMode.ForRead);
Log("drawing: " + Db.Filename);

foreach (ObjectId btrId in bt) {
    var btr = (BlockTableRecord)Tx.GetObject(btrId, OpenMode.ForRead);
    foreach (ObjectId id in btr) {
        Autodesk.AutoCAD.DatabaseServices.DBObject o;
        try { o = Tx.GetObject(id, OpenMode.ForRead); } catch { continue; }
        var mt = o as MText;
        if (mt == null) continue;
        if (mt.Contents.ToUpper().IndexOf("FLOOD") < 0) continue;

        Log("");
        Log("MTEXT [" + o.Handle + "] in \"" + btr.Name + "\"  layer=" + mt.Layer
            + "  height=" + mt.TextHeight.ToString("F4") + "  width=" + mt.Width.ToString("F4"));
        Log("  location " + mt.Location.X.ToString("F4") + "," + mt.Location.Y.ToString("F4")
            + "  attach=" + mt.Attachment + "  style=" + mt.TextStyleName);
        Log("  RAW CONTENTS (one line, unmodified):");
        Log("  >>>" + mt.Contents + "<<<");
        Log("  length=" + mt.Contents.Length);
    }
}

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\SS_BLOCK_11X17.dwg
Message
Executed C3D-0164 (0 entities touched).
Entities
Duration
387 ms
Civil 3D
25.0.0.0

Log

drawing: C:\Users\sanja\OneDrive\_SurveyDisco\SS_BLOCK_11X17.dwg

MTEXT [158D1] in "*Paper_Space"  layer=BLOCK_NOTES_FLOOD  height=0.0550  width=2.9020
  location 7.7231,3.3919  attach=TopLeft  style=L120
  RAW CONTENTS (one line, unmodified):
  >>>FLOOD NOTE:\PTHIS PROPERTY IS NOT LOCATED WITHIN A SPECIAL FLOOD HAZARD AREA (SFHA) AS SHOWN ON F.I.R.M. COMMUNITY PANEL NO. 13135C0016G, EFFECTIVE FEBRUARY 4, 2013, AND LIES IN ZONE X.<<<
  length=185

MTEXT [14522] in "A$C3840e5d8"  layer=BLOCK_TB2  height=2.2000  width=116.0890
  location 63.2283,-102.7619  attach=TopLeft  style=L120
  RAW CONTENTS (one line, unmodified):
  >>>FLOOD NOTE:\PTHIS PROPERTY IS NOT IN AN AREA HAVING SPECIAL FLOOD\PHAZARDS AS PER COMMUNITY PANEL NO. 13121C0087 F, DATED\PSEPTEMBER 18th 2013, ZONE "X".<<<
  length=153

MTEXT [14528] in "A$C3840e5d8"  layer=SS-BOUNDARY  height=3.0000  width=142.0862
  location 32.3400,178.4089  attach=TopLeft  style=DIM
  RAW CONTENTS (one line, unmodified):
  >>>\pxqc;{\LSITE INFORMATION\P}\P\pq*;JURISDICTION:  CITY OF JOHNS CREEK\PPARCEL ID NO.:  11 055002300102\PPROPOSED ZONING:  R-4 SINGLE-FAMILY DWELLING\POVERLAY DISTRICT:  N/A\PFLOOD ZONE CLASSIFICATION: X\P\P\pqc;{\LSETBACK & BUFFERS\P}BUILDING SETBACKS\P\P\pq*;FRONT:  35 FT\PREAR:  25 FT\PSIDE:  7 FT\PLANDSCAPE STRIP:  40 FT (ALONG ABBOTTS BRIDGE ROAD) \P\P\pqc;{\LSITE AREA CALCULATIONS\P}\P\pq*;SITE: {\Fsimplex|c0;\C4;±}0.87 AC/{\Fsimplex|c0;\C4; }37,779.18 SF\PBUILDABLE AREA: {\Fsimplex|c0;\C4;±}0.69 AC/ 29933.18 SF\PUNBUILDABLE AREA: {\Fsimplex|c0;\C4;±}0.18 AC{\Fsimplex|c0;\C4;/ }7846.00 SF\PMINIMUM LOT SIZE: 9000 SF\PSubdivision\~Density: 2 LOTS/0.87\~AC ≈ 2.30\~lots\~per\~acre
\P\pqc;{\LBASE INFORMATION\P}\P\pq*;NO PORTION OF THIS PROPERTY IS LOCATED IN A SPECIAL FLOOD AREA AS PER F.I.R.M. MAP NO. {\Fsimplex|c0;13121C0087 F, DATED\PSEPTEMBER 18th 2013, ZONE "X".\P} \PBASE CONDITIONS PROVIDED BY SAWHNEY ASSOCIATES, DATED 6/21/2024\P\P\pqc;{\LPROPOSED VARIANCES\P\pq*;}\P1. Variance to remove 10% open space requirement under section 12.E3 subsection A of the City of Johns Creek building ordinance<<<
  length=1115

MTEXT [1E7AB] in "*Paper_Space154"  layer=BLOCK_TB2  height=0.0550  width=2.9020
  location 7.8139,5.5746  attach=TopLeft  style=L120
  RAW CONTENTS (one line, unmodified):
  >>>FLOOD NOTE:\PTHIS PROPERTY IS NOT IN AN AREA HAVING SPECIAL FLOOD AS PER COMMUNITY PANEL NO. 13089C0132J, DATED MAY 16th 2013.<<<
  length=126

MTEXT [1FEB6] in "11x17 COVER SHEET SS"  layer=C-0-GNRL-NOTE-INDX  height=0.1000  width=7.2406
  location 2.0952,11.7291  attach=TopLeft  style=TITLE20
  RAW CONTENTS (one line, unmodified):
  >>>THE MAJORITY  SITE DOES NOT LIE WITHIN A 100 YEAR FLOOD HAZARD AREA AND IS LOCATED IN ZONE "X" , HOWEVER A SMALL PORTION LOCATED IN THE  NORTH EAST CORNER DOES LIE IN ZONE A AS SHOWN ON THE ABOVE FEDERAL EMERGENCY MANAGEMENT AGENCY FLOOD INSURANCE RATE MAP NUMBER 13151CO276D WITH AN EFFECTIVE DATE OF OCTOBER 6, 2016.<<<
  length=318

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.