C3D-0051 · READ-ONLY: CogoPoints by description (A-H) [LAYER-AUDIT-PTS-HEAD] done
Same point-by-description table, printing only descriptions sorting before HANDY CAP - the head of the list that was truncated. No changes.
C# payload
// READ-ONLY. Layer audit data for "is everything on the correct layer".
//
// Part 1: the 524 CogoPoints on layer 0 - grouped by raw description, since the description is
// what decides which layer a point belongs on. Points already on a named layer are listed too,
// so the correct-layer mapping can be read off what is ALREADY right rather than invented.
// Part 2: every non-point entity on the 29 used layers, by layer and type, with a sample.
// Nothing is modified. No layer is changed. This only reports.
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
// ---- Part 1: CogoPoints by (layer, description) ----
var byDesc = new Dictionary<string, Dictionary<string,int>>(); // desc -> layer -> count
int npts = 0;
foreach (ObjectId id in ms) {
var cp = Tx.GetObject(id, OpenMode.ForRead) as CogoPoint;
if (cp == null) continue;
npts++;
string d = (cp.RawDescription ?? "").Trim().ToUpper();
if (d.Length == 0) d = "<blank>";
string lay = cp.Layer;
if (!byDesc.ContainsKey(d)) byDesc[d] = new Dictionary<string,int>();
if (!byDesc[d].ContainsKey(lay)) byDesc[d][lay] = 0;
byDesc[d][lay]++;
}
Log("=== COGO POINTS: " + npts + " total, by DESCRIPTION -> layer(count) ===");
var descs = new List<string>(byDesc.Keys);
descs.Sort();
foreach (var d in descs) {
if (String.Compare(d, "HANDY CAP") >= 0) continue; // tail already read
var parts = new List<string>();
int tot = 0;
foreach (var kv in byDesc[d]) { parts.Add(kv.Key + "(" + kv.Value + ")"); tot += kv.Value; }
Log(String.Format(" {0,-16} n={1,-4} {2}", d, tot, String.Join(" ", parts)));
}
Result
Log
=== COGO POINTS: 564 total, by DESCRIPTION -> layer(count) === <blank> n=1 0(1) 1 IN BLUE WATER LINE STUB n=1 0(1) 1 IN WATER LINE n=1 0(1) 18 CON PIPEINV 6.1 TO TOP OF BOX n=1 0(1) 2 IN PVC LINE n=1 0(1) 2 IN RPZ BFP COR n=4 0(4) 24IN RIDGED INV 9.42 WITH SILT n=1 0(1) 24IN RIDGED PIPE INV TO 18 PIPE INV 5.3 BOT 11.1 n=1 0(1) 2X1 TRAFIC SIG BX n=1 SS-0-FRAME(1) 40EASEMENT n=2 0(2) 6 IN BOL n=19 0(19) 6 IN PVC STUB n=1 0(1) AC n=5 0(5) BLDG COR SW n=4 0(4) BLDG COR CON TBC START n=1 0(1) BOX COR n=3 0(3) CL n=20 0(20) CL YELLOW LINE SPLITS n=1 0(1) CLEAN OUT n=5 0(5) CON n=3 0(3) CON COR CANOPY n=2 0(2) CON EP n=9 0(9) CON EP CANOPY n=2 0(2) CON PAD n=8 0(8) CON PAD VAULT n=1 0(1) CON VAC\AIR n=1 0(1) CROSS WALK SIG n=1 SS-0-FRAME(1) CURB CUT BACK CON GUTTER n=5 0(5) DI n=7 0(7) DI 18 CON PIPE INV 4.73 n=1 0(1) DI 18 METAL PIPE INV 3.73 n=1 0(1) DI 18 METAL PIPE INV 3.95 n=1 0(1) DI 18 PIPE INV 3.4 n=1 0(1) DI 2FT ROUND INV 10.11 n=1 0(1) DI INV BOT 5.08 18 CON PIPE n=1 0(1) DOT SIG BOX 4X4 n=1 SS-0-FRAME(1) DUMP STER COR n=3 0(3) DUMPSTER COR TBC n=1 0(1) ELEC POWERBMETER AND STUT OFF n=1 0(1) ELEC STUB n=4 0(4) END CON n=2 0(2) EP n=37 0(37) EP CON n=2 0(2) EP CON COR n=4 0(4) EP DUMPSTER WALL n=1 0(1) EP TBC n=1 0(1) FH n=4 WATER_VALVE(4) G RAIL n=4 0(4) G WIRE n=5 0(5) GREASE TRAP n=5 0(5) GREASE TRAP 6 PVC 6.52 INV 7.77 n=1 0(1) GREASE TRAP ASPHALT OVER n=1 0(1) GUTTER n=3 0(3) GUTTER END TBC n=1 0(1) H CAP SIGN n=2 0(2)
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.