C3D-0643 · Init inventory (read-only) [C3D-INIT] done
Drawing path, layouts, Civil counts, layer/entity counts.
C# payload
Log("drawing: "+Db.Filename);
var bt=(BlockTable)Tx.GetObject(Db.BlockTableId,OpenMode.ForRead);
var cnt=new SortedDictionary<string,SortedDictionary<string,int>>(StringComparer.OrdinalIgnoreCase);
var lays=new List<string>();
foreach(ObjectId sid in bt){
var b=(BlockTableRecord)Tx.GetObject(sid,OpenMode.ForRead); if(!b.IsLayout) continue;
var lo=(Layout)Tx.GetObject(b.LayoutId,OpenMode.ForRead); int n=0;
foreach(ObjectId id in b){ var en=Tx.GetObject(id,OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity; if(en==null) continue; n++;
if(!cnt.ContainsKey(en.Layer)) cnt[en.Layer]=new SortedDictionary<string,int>(); var t=en.GetType().Name; cnt[en.Layer][t]=cnt[en.Layer].ContainsKey(t)?cnt[en.Layer][t]+1:1; }
lays.Add(lo.LayoutName+"("+n+")");
}
Log("layouts: "+string.Join(", ",lays));
Log("cogo points: "+CivilDoc.CogoPoints.Count+" surfaces: "+CivilDoc.GetSurfaceIds().Count+" alignments: "+CivilDoc.GetAlignmentIds().Count+" pipe networks: "+CivilDoc.GetPipeNetworkIds().Count);
foreach(var kv in cnt) Log(" "+kv.Key.PadRight(32)+" n="+kv.Value.Values.Sum().ToString().PadRight(6)+" ["+string.Join(" ",kv.Value.Select(x=>x.Key+":"+x.Value))+"]");
Result
Log
drawing: C:\Users\sanja\OneDrive\_SurveyDisco\260714 - 285 Huckaby Rd, Brooks, GA 30205, USA\260714 - 285 Huckaby Rd 22x17.dwg layouts: Model(605), COVER(289), 17X11(158), COVER (22)(39), 22X17 (2)(144) cogo points: 202 surfaces: 0 alignments: 0 pipe networks: 0 0 n=191 [AlignedDimension:1 CogoPoint:184 MText:2 Viewport:4] 1 n=3 [Ole2Frame:1 Polyline:2] BLOCK_CLOSURE n=68 [Arc:2 DBText:18 Line:24 Polyline:8 Polyline2d:4 RasterImage:4 Solid:8] BLOCK_NORTH_ARROW n=202 [Arc:4 DBText:2 Line:180 Polyline2d:16] BLOCK_NOTES_FLOOD n=12 [MText:12] BLOCK_TB2 n=7 [BlockReference:4 Viewport:3] C-ANNO n=46 [Leader:4 MText:24 NoteLabel:18] C-ANNO-TABL-TTBL n=5 [Site:5] C-PROP n=2 [Parcel:2] C-PROP-LINE n=3 [ParcelSegment:3] C-PROP-LINE-TEXT n=13 [ParcelSegmentLabel:13] FLOOD-2013-EXIST-100YR n=4 [Line:1 Polyline:3] FLOOD-2013-EXIST-100YR-FULL n=6 [Polyline:6] FLOOD-2013-FUTURE-100YR n=4 [Polyline:4] FLOOD-2013-FUTURE-100YR-FULL n=6 [Polyline:6] FLOOD-2013-XSEC n=4 [Polyline:4] FLOOD-2013-XSEC-FULL n=38 [DBText:6 Polyline:32] FLOOD-2013-XSEC-TEXT n=34 [DBText:34] GIS-PARCEL-REF n=1 [Polyline:1] LABELS n=7 [DBPoint:1 DBText:6] LAND_LOT_LINE n=2 [Line:2] LAND_LOT_LINE_TEXT n=6 [Circle:4 MText:2] NOTE n=7 [DBText:7] NOTES n=77 [BlockReference:2 DBText:54 Polyline:15 Polyline2d:6] NWI-CONTROL-PTS n=56 [Circle:16 CogoPoint:8 DBPoint:16 DBText:16] NWI-TEXT n=6 [DBText:6] NWI-WETLANDS n=3 [Line:1 Polyline:2] NWI-WETLANDS-FULL n=6 [Polyline:6] PARCEL n=24 [Line:24] SPSYMBOLS n=4 [MText:3 Site:1] SS-0-FRAME n=28 [Circle:4 CogoPoint:8 GeneralSegmentLabel:1 Line:5 MText:4 ParcelSegmentLabel:5 Polyline:1] SS-BOUNDARY n=16 [BlockReference:2 Line:7 NoteLabel:1 Ole2Frame:4 Polyline:1 Site:1] SS-BOUNDARY 5AC-C n=25 [MText:22 Polyline:1 RasterImage:2] SS-BOUNDARY CYAN 050 n=8 [CogoPoint:2 Parcel:1 ParcelSegment:1 ParcelSegmentLabel:3 Polyline:1] SS-BOUNDARY MAG FULL n=1 [Polyline:1] SS-BOUNDARY RED n=1 [Polyline:1] SS-BUFFER LANDSCAPE n=1 [Site:1] SS-BUFFER SETBACK n=29 [AlignedDimension:1 Line:24 MText:2 Site:2] SS-FLOODBOX n=2 [Ole2Frame:1 RasterImage:1] SS-FLOW WELL n=1 [Circle:1] SS-GAS n=1 [Line:1] SS-STREAM BUFFER 75 n=3 [Polyline:3] SS-STREAM BUFFER 75-FULL n=3 [Polyline:3] SS-STREAM CL n=1 [Polyline:1] SS-STREAM CL-FULL n=1 [Polyline:1] SS-V-BLDG-OTLN n=15 [Line:12 Polyline:3] SS-V-POWER-CL n=4 [Line:4] SS-V-POWER-EASEMENT n=13 [AlignedDimension:3 Line:10] SS-V-ROAD-CNTR n=2 [Polyline:2] SS-V-ROAD-EPVM n=5 [Polyline:5] SS-V-WALK n=1 [Polyline:1] SS-X-FENCE n=2 [Polyline:2] T-BLOCK n=207 [DBText:121 Hatch:2 Line:40 MText:28 Polyline:9 Polyline2d:7] V-NODE-TEXT n=3 [AlignedDimension:2 Line:1] V-STRC-WALL n=10 [BlockReference:2 Line:4 Polyline:4] X-DRIV-CONC n=5 [Hatch:2 Polyline:3]
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.