C3D-0070 · READ-ONLY: do point or label styles reference V-NODE-TEXT [VNODE-STYLES] done
V-NODE-TEXT holds no entities in any block table record, so the remaining reference path is a Civil style naming the layer. Enumerates point styles and point label styles (using StyleBase, not the SymbolTableRecord cast that threw last run) and lists any CogoPoint on a V-NODE-* layer. No changes.
C# payload
// READ-ONLY. V-NODE-TEXT shows 0 entities anywhere, including block definitions, yet the user
// says it is used. Remaining place it can be referenced: a Civil STYLE naming the layer.
//
// Last attempt cast PointStyle to SymbolTableRecord and threw - PointStyle derives from
// StyleBase, not SymbolTableRecord. Use StyleBase and read each style's marker/label layer.
// Also check the CogoPoints themselves for a per-point label style override.
// Nothing is modified.
var civil = CivilApplication.ActiveDocument;
Func<Func<string>, string> safe = f => { try { return f(); } catch (System.Exception ex) { return "<" + ex.GetType().Name + ">"; } };
Log("=== POINT STYLES ===");
try {
foreach (ObjectId sid in civil.Styles.PointStyles) {
var o = Tx.GetObject(sid, OpenMode.ForRead);
var sb = o as Autodesk.Civil.DatabaseServices.Styles.StyleBase;
string nm = sb != null ? safe(() => sb.Name) : o.GetType().Name;
var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
Log(" " + nm + " entityLayer=" + (ent != null ? safe(() => ent.Layer) : "n/a"));
}
} catch (System.Exception ex) { Log(" " + ex.Message); }
Log("");
Log("=== POINT LABEL STYLES ===");
try {
foreach (ObjectId sid in civil.Styles.LabelStyles.PointLabelStyles.LabelStyles) {
var o = Tx.GetObject(sid, OpenMode.ForRead);
var sb = o as Autodesk.Civil.DatabaseServices.Styles.StyleBase;
string nm = sb != null ? safe(() => sb.Name) : o.GetType().Name;
var ent = o as Autodesk.AutoCAD.DatabaseServices.Entity;
Log(" " + nm + " entityLayer=" + (ent != null ? safe(() => ent.Layer) : "n/a"));
}
} catch (System.Exception ex) { Log(" " + ex.Message); }
// Any CogoPoint whose own layer OR label is on the target layers
Log("");
Log("=== CogoPoints referencing V-NODE-* ===");
var ms = (BlockTableRecord)Tx.GetObject(SymbolUtilityServices.GetBlockModelSpaceId(Db), OpenMode.ForRead);
int hits = 0;
foreach (ObjectId id in ms) {
var cp = Tx.GetObject(id, OpenMode.ForRead) as CogoPoint;
if (cp == null) continue;
string lay = safe(() => cp.Layer);
if (lay.StartsWith("V-NODE")) {
hits++;
Log(" pt " + safe(() => cp.PointNumber.ToString()) + " " + safe(() => cp.RawDescription) + " layer=" + lay);
}
}
Log(" CogoPoints on a V-NODE-* layer: " + hits);
Result
Log
=== POINT STYLES === Horizontal Curve Point entityLayer=n/a Water Shutoff entityLayer=n/a Benchmark entityLayer=n/a Iron Pin [LARGE] entityLayer=n/a Gas Valve entityLayer=n/a Vertical Curve Point entityLayer=n/a Guy Pole entityLayer=n/a Bound entityLayer=n/a Shrub - 5ft entityLayer=n/a STA entityLayer=n/a Catch Basin entityLayer=n/a Storm Sewer Manhole entityLayer=n/a Sign (single pole) entityLayer=n/a Tree entityLayer=n/a Utility Pole entityLayer=n/a Well entityLayer=n/a Sanitary Sewer Manhole entityLayer=n/a Iron Pin entityLayer=n/a Hydrant (proposed) entityLayer=n/a TBC Yellow entityLayer=n/a Basic entityLayer=n/a Drill Hole entityLayer=n/a Water Valve entityLayer=n/a Standard entityLayer=n/a Gas METER entityLayer=n/a Test Pit entityLayer=n/a Hydrant (existing) entityLayer=n/a === POINT LABEL STYLES === Description Only [IPF] entityLayer=n/a Elevation Only entityLayer=n/a Point#-Elevation-Description [HANDICAP] entityLayer=n/a Elevation and Description entityLayer=n/a Northing and Easting entityLayer=n/a Point Number Only entityLayer=n/a Point# and Description entityLayer=n/a Standard entityLayer=n/a Point#-Elevation-Description entityLayer=n/a Description Only entityLayer=n/a === CogoPoints referencing V-NODE-* === CogoPoints on a V-NODE-* layer: 0
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.