C3D-CHECKMHOL · Check what landed after MHOLSYM error (read-only) done
Count SEWER_MANHOLE*/LEGEND entities to see what survived the crash.
C# payload
// READ-ONLY: did the manhole circles + any legend geometry actually land?
using System;
using System.Collections.Generic;
using Autodesk.AutoCAD.DatabaseServices;
var db = Db;
using (var tr = db.TransactionManager.StartTransaction())
{
var ms = (BlockTableRecord)tr.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(db), OpenMode.ForRead);
var counts = new Dictionary<string,int>(StringComparer.OrdinalIgnoreCase);
foreach (ObjectId id in ms)
{
var e = tr.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (e == null) continue;
if (e.Layer.IndexOf("SEWER_MANHOLE", StringComparison.OrdinalIgnoreCase) >= 0
|| e.Layer.IndexOf("LEGEND", StringComparison.OrdinalIgnoreCase) >= 0)
{
var key = $"{e.Layer}/{e.GetType().Name}";
counts[key] = counts.TryGetValue(key, out var c) ? c+1 : 1;
}
}
Log("SEWER_MANHOLE* / LEGEND entities present:");
foreach (var kv in counts) Log($" {kv.Key}: {kv.Value}");
tr.Commit();
}
Result
Log
SEWER_MANHOLE* / LEGEND entities present: SEWER_MANHOLE_TEXT/DBText: 21
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.