C3D-0389 · READ-ONLY: grease-trap point coordinates + a sample annotation style/height [C3D-GTXY] done
Reports E/N/Z of every grease-trap point so the two side-by-side pairs can be identified and boxes sized, plus a few nearby MText labels for text style and height reference.
C# payload
// Coordinates of every grease-trap point, so the two side-by-side pairs can be identified and
// boxes sized. Also report the SEWER text style + a sample text height so the MText matches.
var civ = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
Log("drawing: " + Db.Filename);
foreach (ObjectId id in civ.CogoPoints){
var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead);
string u=((p.RawDescription??"")).ToUpper();
if (!u.Contains("GREASE")) continue;
Log(string.Format(" {0,5} E={1:F3} N={2:F3} Z={3:F3} layer={4} \"{5}\"",
p.PointNumber, p.Easting, p.Northing, p.Elevation, p.Layer, p.RawDescription));
}
// a nearby existing MTEXT for style/height reference (e.g. the "4\"SL" or "SS" labels)
Log("");
Log("=== sample nearby annotation for style/height ===");
var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
int shown=0;
foreach (ObjectId id in ms){
var mt=Tx.GetObject(id,OpenMode.ForRead) as MText;
if (mt==null) continue;
string t=mt.Contents;
if (t.IndexOf("SL",StringComparison.Ordinal)<0 && t.IndexOf("INSTALL",StringComparison.OrdinalIgnoreCase)<0 && t.IndexOf("PROP",StringComparison.OrdinalIgnoreCase)<0) continue;
var st=(TextStyleTableRecord)Tx.GetObject(mt.TextStyleId,OpenMode.ForRead);
Log(string.Format(" MTEXT [{0}] h={1:F2} style=\"{2}\" layer={3} \"{4}\"", mt.Handle, mt.TextHeight, st.Name, mt.Layer, t.Replace("\n"," ")));
if(++shown>=6) break;
}
Result
Log
drawing: C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\260612-C-Store As-Built 60 H2O.dwg
354 E=2296684.238 N=1280059.679 Z=727.862 layer=SEWER_GREASE_TRAPS "GREASE TRAP"
355 E=2296684.774 N=1280067.489 Z=727.868 layer=SEWER_GREASE_TRAPS "GREASE TRAP"
359 E=2296632.039 N=1280069.362 Z=728.100 layer=SEWER_GREASE_TRAPS "GREASE TRAP"
1096 E=2296683.978 N=1280059.597 Z=727.992 layer=SS-0-FRAME "GREASE TRAP 6 PVC 6.52 INV 7.77"
1100 E=2296639.703 N=1280069.203 Z=727.940 layer=SEWER_GREASE_TRAPS "GREASE TRAP"
=== sample nearby annotation for style/height ===
MTEXT [2FA88] h=3.00 style="SIMPLEX" layer=SS-0-FRAME "N/F\P3 STAR PROPERTIES LLC\P\PPARCEL ID\P087-02010006"
MTEXT [302E0] h=3.00 style="SIMPLEX" layer=WATER_LINE_TEXT "8" TSV (TAPPING SLEEVE & VALVE)\PON EXIST. 8" DIP WL"Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.