C3D-0040 · READ-ONLY: locate the SEWER EASEMENT 36239.95 annotation [FIND-SSE-ANNO] error
Walks every model-space entity with no type or layer filter, matching on the text 36239 / 0.83 / SEWER EASEMENT, and reports the matched object type, layer, position, style and parent parcel. No changes.
C# payload
// READ-ONLY. Find the "SEWER EASEMENT / 36239.95 SQ FT / 0.83 ACRES" annotation.
//
// Do NOT filter by type or layer this time - my earlier scans filtered on both and missed it.
// Walk EVERY entity in model space, pull whatever text it exposes, and match on the number.
// Then report exactly what it is and what holds it. Nothing is modified.
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
Func<DBObject, string> textOf = o => {
var mt = o as MText; if (mt != null) return mt.Contents;
var dt = o as DBText; if (dt != null) return dt.TextString;
var lb = o as Autodesk.Civil.DatabaseServices.Label;
if (lb != null) { try { return lb.GetTextComponentValue(); } catch { return "<label>"; } }
return null;
};
int scanned = 0, hits = 0;
foreach (ObjectId id in ms) {
DBObject o;
try { o = Tx.GetObject(id, OpenMode.ForRead); } catch { continue; }
scanned++;
string s = null;
try { s = textOf(o); } catch { }
if (s == null) continue;
if (s.IndexOf("36239") < 0 && s.IndexOf("0.83") < 0 && s.ToUpper().IndexOf("SEWER EASEMENT") < 0) continue;
hits++;
var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
Log("");
Log("HIT [" + o.Handle + "] type=" + o.GetType().FullName);
Log(" layer " + (ent != null ? ent.Layer : "?"));
Log(" text " + s.Replace("\n", " | "));
if (ent != null) {
try { var e = ent.GeometricExtents; Log(String.Format(" at {0:F2},{1:F2}", e.MinPoint.X, e.MinPoint.Y)); } catch { }
}
var lbl = o as Autodesk.Civil.DatabaseServices.Label;
if (lbl != null) {
try { Log(String.Format(" LabelLocation {0:F2},{1:F2}", lbl.LabelLocation.X, lbl.LabelLocation.Y)); } catch { }
try { Log(" StyleName " + lbl.StyleName); } catch { }
try {
var par = Tx.GetObject(lbl.FeatureId, OpenMode.ForRead);
string extra = "";
var pp = par as Parcel;
if (pp != null) extra = " name=\"" + pp.Name + "\" area=" + pp.Area.ToString("F2");
Log(" PARENT [" + par.Handle + "] " + par.GetType().Name + extra);
} catch (System.Exception ex) { Log(" PARENT: " + ex.Message); }
}
}
Log("");
Log("scanned " + scanned + " model-space entities, matched " + hits);
Result
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.