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.
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
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.