← Inbox

C3D-0545 · Audit 261003 linework (read-only) done

Count polylines per layer within the site window to catch duplicates.

Script file
C3D-0545.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);
var t=new System.Collections.Generic.Dictionary<string,int>();
foreach(ObjectId e in ms){ if(e.IsErased) continue; var pl=Tx.GetObject(e,OpenMode.ForRead) as Polyline; if(pl==null) continue; var x=pl.GeometricExtents; if(x.MaxPoint.X>2323400&&x.MinPoint.X<2323800&&x.MaxPoint.Y>1582300&&x.MinPoint.Y<1582650){ if(!t.ContainsKey(pl.Layer)) t[pl.Layer]=0; t[pl.Layer]++; } }
foreach(var kv in t) Log(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-0545 (0 entities touched).
Entities
—
Duration
358 ms
Civil 3D
25.0.0.0

Log

SS-V-ROAD-EPVM x2
V-SITE-FNCE x2
X-DRIVEWAY x1
SS-V-BLDG-OTLN x4

Notes

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

No notes yet.