C3D-CURBLAYERTYPES · Entity type breakdown on SS-V-ROAD-CURB done
Read-only: diagnose why erasing SS-V-ROAD-CURB entities failed with eNotApplicable.
C# payload
// READ-ONLY: what entity types are on SS-V-ROAD-CURB (90 found) - the erase failed with eNotApplicable
// on one of them, need to know which type(s) so we can handle/skip appropriately.
using System;
using System.Collections.Generic;
using System.Linq;
using Autodesk.AutoCAD.DatabaseServices;
const string LAYER = "SS-V-ROAD-CURB";
var byType = new Dictionary<string,int>();
foreach (ObjectId id in ModelSpace)
{
var ent = Tx.GetObject(id, OpenMode.ForRead) as Autodesk.AutoCAD.DatabaseServices.Entity;
if (ent == null) continue;
if (ent.Layer != LAYER) continue;
var t = ent.GetType().FullName;
byType[t] = byType.TryGetValue(t, out var c) ? c+1 : 1;
if (ent.IsErased || !ent.IsWriteEnabled && false) {} // no-op, just placeholder for clarity
}
foreach (var kv in byType.OrderByDescending(k=>k.Value))
Log($"{kv.Value,4} {kv.Key}");
Result
Log
33 Autodesk.AutoCAD.DatabaseServices.Polyline3d 18 Autodesk.AutoCAD.DatabaseServices.Line 15 Autodesk.AutoCAD.DatabaseServices.Polyline 11 Autodesk.Civil.DatabaseServices.FeatureLine 10 Autodesk.AutoCAD.DatabaseServices.AlignedDimension 1 Autodesk.Civil.DatabaseServices.Site 1 Autodesk.AutoCAD.DatabaseServices.Hatch 1 Autodesk.AutoCAD.DatabaseServices.Wipeout
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.