← Inbox

C3D-0535 · Existing linework near site 261003 (read-only) [C3D-0536] done

Count non-point entities within the 236 Pinewood site window vs elsewhere, by type/layer.

Script file
C3D-0535.cs
Target
261003 - 236 Pinewood Trail.dwg · model space
Author
claude
Approved
yes · auto-auth
Timeout
60s

C# payload


var ms=(BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db),OpenMode.ForRead);
int near=0,far=0; var nearL=new System.Collections.Generic.Dictionary<string,int>();
foreach(ObjectId e in ms){ if(e.IsErased) continue; var en=Tx.GetObject(e,OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity; if(en==null||en is Autodesk.Civil.DatabaseServices.CogoPoint) continue; Extents3d x; try{x=en.GeometricExtents;}catch{continue;}
  bool n = x.MaxPoint.X>2323400 && x.MinPoint.X<2323800 && x.MaxPoint.Y>1582300 && x.MinPoint.Y<1582650;
  if(n){ near++; string k=en.GetType().Name+"@"+en.Layer; if(!nearL.ContainsKey(k)) nearL[k]=0; nearL[k]++; } else far++; }
Log("near site="+near+" far="+far); foreach(var kv in nearL) Log("  NEAR "+kv.Key+" x"+kv.Value);

Result

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\261003 - 236 Pinewood Trail, Dawsonville, GA 30534, USA\261003 - 236 Pinewood Trail.dwg
Message
Executed C3D-0535 (0 entities touched).
Entities
—
Duration
458 ms
Civil 3D
25.0.0.0

Log

near site=1 far=138
  NEAR Circle@SS-FLOW WELL x1

Notes

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

No notes yet.