C3D-0010 · Find A14 annotation [FIND-A14] done
Read-only: every text, mtext, leader, label, block attribute or point description mentioning A14, across model space, all layouts and block definitions. Plus all SSMH/MH/INV points for context.
C# payload
// READ-ONLY: find anything mentioning A14 - text, mtext, labels, attributes, point descriptions -
// across model space, every layout, and block definitions.
bool Hit(string t) { return t != null && t.ToUpper().Replace(" ","").Contains("A14"); }
void Scan(BlockTableRecord btr, string where)
{
foreach (ObjectId id in btr)
{
var e = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e == null) continue;
var mt = e as MText;
if (mt != null && Hit(mt.Contents)) {
Log("[" + where + "] MTEXT h=" + e.Handle + " layer='" + e.Layer + "' at (" +
mt.Location.X.ToString("F2") + "," + mt.Location.Y.ToString("F2") + ")");
Log(" " + mt.Contents.Replace("\u005CP", " | ")); continue; }
var dt = e as DBText;
if (dt != null && Hit(dt.TextString)) {
Log("[" + where + "] DBTEXT h=" + e.Handle + " layer='" + e.Layer + "' at (" +
dt.Position.X.ToString("F2") + "," + dt.Position.Y.ToString("F2") + ") '" + dt.TextString + "'"); continue; }
var ld = e as MLeader;
if (ld != null) {
string t = null;
try { t = ld.MText != null ? ld.MText.Contents : null; } catch {}
if (Hit(t)) { Log("[" + where + "] MLEADER h=" + e.Handle + " layer='" + e.Layer + "' " +
t.Replace("\u005CP"," | ")); continue; }
}
var lbl = e as Autodesk.Civil.DatabaseServices.Label;
if (lbl != null) {
Log("[" + where + "] " + lbl.GetType().Name + " h=" + e.Handle + " layer='" + e.Layer +
"' style='" + lbl.StyleName + "'"); continue; }
var br = e as BlockReference;
if (br != null) {
foreach (ObjectId aid in br.AttributeCollection) {
var ar = Tx.GetObject(aid, OpenMode.ForRead) as AttributeReference;
if (ar != null && Hit(ar.TextString)) {
var d0 = (BlockTableRecord)Tx.GetObject(br.BlockTableRecord, OpenMode.ForRead);
Log("[" + where + "] ATTR block='" + d0.Name + "' tag='" + ar.Tag + "' = '" + ar.TextString + "'");
}
}
}
}
}
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
Scan(ms, "model");
var layDict = (DBDictionary)Tx.GetObject(Db.LayoutDictionaryId, OpenMode.ForRead);
foreach (DBDictionaryEntry de in layDict) {
var lay = (Layout)Tx.GetObject(de.Value, OpenMode.ForRead);
Scan((BlockTableRecord)Tx.GetObject(lay.BlockTableRecordId, OpenMode.ForRead), lay.LayoutName);
}
Log("=== points whose description mentions A14 ===");
var cd = CivilDoc;
foreach (ObjectId id in cd.CogoPoints) {
var cp = Tx.GetObject(id, OpenMode.ForRead) as CogoPoint;
if (cp == null) continue;
if (!Hit(cp.RawDescription)) continue;
Log(" pt " + cp.PointNumber + " (" + cp.Easting.ToString("F2") + "," + cp.Northing.ToString("F2") +
"," + cp.Elevation.ToString("F2") + ") '" + cp.RawDescription + "' layer='" + cp.Layer + "'");
}
Log("=== all SSMH-ish point descriptions (for context) ===");
foreach (ObjectId id in cd.CogoPoints) {
var cp = Tx.GetObject(id, OpenMode.ForRead) as CogoPoint;
if (cp == null) continue;
var d = (cp.RawDescription ?? "").ToUpper();
if (!(d.Contains("SSMH") || d.Contains("MH") || d.Contains("INV"))) continue;
Log(" pt " + cp.PointNumber + " (" + cp.Easting.ToString("F2") + "," + cp.Northing.ToString("F2") +
"," + cp.Elevation.ToString("F2") + ") '" + cp.RawDescription + "'");
}
Result
Log
[model] ParcelSegmentLabel h=23925 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23926 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23927 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23928 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23929 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392A layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392B layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392C layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392D layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392E layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=2392F layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23930 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23931 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23932 layer='0' style='Standard.Tag.1'
[model] ParcelSegmentLabel h=23933 layer='0' style='Standard.Tag.1'
[model] MTEXT h=2B4D0 layer='PDF2_Text' at (2297792.71,1277543.53)
MH A14
[model] ParcelSegmentLabel h=2E1ED layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[model] ParcelSegmentLabel h=2E1EE layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[model] ParcelSegmentLabel h=2E1EF layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[model] ParcelSegmentLabel h=2E1F0 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[model] ParcelSegmentLabel h=2E1F1 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[model] ParcelSegmentLabel h=2E1F2 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[model] ParcelSegmentLabel h=2E1F3 layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[model] ParcelSegmentLabel h=2E1F4 layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[model] NoteLabel h=2E333 layer='C-ANNO' style='.16'
[model] NoteLabel h=2E371 layer='C-ANNO' style='.16'
[model] NoteLabel h=2ED0B layer='C-ANNO' style='.08'
[Model] ParcelSegmentLabel h=23925 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23926 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23927 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23928 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23929 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392A layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392B layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392C layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392D layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392E layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=2392F layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23930 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23931 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23932 layer='0' style='Standard.Tag.1'
[Model] ParcelSegmentLabel h=23933 layer='0' style='Standard.Tag.1'
[Model] MTEXT h=2B4D0 layer='PDF2_Text' at (2297792.71,1277543.53)
MH A14
[Model] ParcelSegmentLabel h=2E1ED layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[Model] ParcelSegmentLabel h=2E1EE layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[Model] ParcelSegmentLabel h=2E1EF layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[Model] ParcelSegmentLabel h=2E1F0 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[Model] ParcelSegmentLabel h=2E1F1 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[Model] ParcelSegmentLabel h=2E1F2 layer='C-PROP-LINE-TEXT' style='Delta over Length and Radius'
[Model] ParcelSegmentLabel h=2E1F3 layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[Model] ParcelSegmentLabel h=2E1F4 layer='C-PROP-LINE-TEXT' style='Bearing over Distance'
[Model] NoteLabel h=2E333 layer='C-ANNO' style='.16'
[Model] NoteLabel h=2E371 layer='C-ANNO' style='.16'
[Model] NoteLabel h=2ED0B layer='C-ANNO' style='.08'
=== points whose description mentions A14 ===
=== all SSMH-ish point descriptions (for context) ===
pt 344 (2296714.07,1280025.30,726.97) 'SSMH'
pt 352 (2296690.96,1280045.90,727.55) 'SSMH A10'
pt 353 (2296685.19,1280052.35,727.68) 'SSMH TEST MH'
pt 358 (2296651.99,1280058.10,727.72) 'SSMH TEST MH'
pt 377 (2296604.65,1280046.20,727.40) 'SSMH'
pt 378 (2296827.25,1280095.99,724.78) 'SSMH A6'
pt 379 (2296878.69,1280034.22,721.41) 'SSMH A5'
pt 380 (2296980.45,1279912.31,691.53) 'SSMH A4'
pt 381 (2297249.93,1279675.24,682.94) 'SSMH A3'
pt 382 (2297269.03,1279597.72,688.33) 'SSMH A2'
pt 383 (2297422.96,1279618.78,687.05) 'SSMH A1'
pt 384 (2297424.71,1279599.32,686.70) 'SSMH MAIN'
pt 390 (2296655.81,1279977.60,726.49) 'MH'
pt 424 (2296511.25,1279951.45,734.14) 'SSMH'
pt 473 (2296379.85,1279953.52,751.17) 'SSMH'
pt 809 (2296714.14,1280025.06,726.39) 'SSMH INV 12.65'
pt 810 (2296691.10,1280045.90,727.71) 'SSMH INV 10.28'
pt 812 (2296604.89,1280046.15,727.45) 'SSMH'
pt 814 (2296511.06,1279951.56,733.76) 'SSMH INV 12.22'
pt 816 (2296379.89,1279953.45,746.11) 'SSMH'
pt 1082 (2296741.72,1280081.75,727.53) 'DI INV BOT 5.08 18 CON PIPE'
pt 1090 (2296679.61,1280015.76,726.46) '18 CON PIPEINV 6.1 TO TOP OF BOX'
pt 1095 (2296685.40,1280052.25,727.56) 'SSMH INV 9.45'
pt 1096 (2296683.98,1280059.60,727.99) 'GREASE TRAP 6 PVC 6.52 INV 7.77'
pt 1102 (2296618.42,1280009.73,727.67) '24IN RIDGED PIPE INV TO 18 PIPE INV 5.3 BOT 11.1'
pt 1104 (2296655.59,1279976.50,726.13) '24IN RIDGED INV 9.42 WITH SILT'
pt 1107 (2296577.06,1280053.71,727.60) 'DI 18 CON PIPE INV 4.73'
pt 1108 (2296576.90,1280176.31,728.30) 'DI 18 METAL PIPE INV 3.95'
pt 1109 (2296577.54,1280209.65,729.21) 'DI 18 METAL PIPE INV 3.73'
pt 1110 (2296749.63,1280173.82,727.51) 'DI 18 PIPE INV 3.4'
pt 1139 (2296586.21,1279970.35,727.31) 'DI 2FT ROUND INV 10.11'Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.