← Inbox

C3D-0388 · READ-ONLY: grease-trap CogoPoints and their layer [C3D-GTPTS] done

Searches CogoPoint descriptions for grease/trap/GT and reports point number, description and the layer each point sits on.

Script file
C3D-0388.cs
Target
260612-C-Store As-Built 60 H2O.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
120s

C# payload

// Grease traps are CogoPoints. Find points whose description mentions grease/trap/GT and report
// point number, description, and the layer the point is on.
var civ = Autodesk.Civil.ApplicationServices.CivilApplication.ActiveDocument;
Log("drawing: " + Db.Filename);
int hits=0;
foreach (ObjectId id in civ.CogoPoints){
    var p=(Autodesk.Civil.DatabaseServices.CogoPoint)Tx.GetObject(id,OpenMode.ForRead);
    string d=(p.RawDescription ?? "").Trim(); string f="";
    try { f=(p.FullDescription ?? "").Trim(); } catch {}
    string u=(d+" "+f).ToUpper();
    if (u.Contains("GREASE") || u.Contains("TRAP") || u.Contains("GT")){
        Log(string.Format("  {0,5}  layer={1,-20} raw=\"{2}\"  full=\"{3}\"", p.PointNumber, p.Layer, d, f));
        hits++;
    }
}
Log("");
Log(hits==0 ? "no grease-trap points" : ("matches: " + hits));

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260613 - 5030 E Lake Pkwy, Stockbridge, GA 30281, USA\260612-C-Store As-Built 60 H2O.dwg
Message
Executed C3D-0388 (0 entities touched).
Entities
Duration
446 ms
Civil 3D
25.0.0.0

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  layer=SEWER_GREASE_TRAPS   raw="GREASE TRAP"  full="GREASE TRAP"
    355  layer=SEWER_GREASE_TRAPS   raw="GREASE TRAP"  full="GREASE TRAP"
    359  layer=SEWER_GREASE_TRAPS   raw="GREASE TRAP"  full="GREASE TRAP"
   1096  layer=SS-0-FRAME           raw="GREASE TRAP 6 PVC 6.52 INV 7.77"  full="GREASE TRAP 6 PVC 6.52 INV 7.77"
   1100  layer=SEWER_GREASE_TRAPS   raw="GREASE TRAP"  full="GREASE TRAP"

matches: 5

Notes

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

No notes yet.