C3D-0086 · READ-ONLY: list parcel curve label styles and component visibility [STYLE-LIST] done
Lists every parcel curve label style with its text components and whether each is visible, to establish whether CURVE DELTA OFF exists and what state it is in. No changes.
C# payload
// READ-ONLY. List every parcel curve label style and, for each, its text components and their
// visibility. Nothing is modified.
var civil = CivilApplication.ActiveDocument;
Func<Func<string>, string> safe = f => { try { return f(); } catch (System.Exception ex) { return "<" + ex.GetType().Name + ">"; } };
foreach (ObjectId sid in civil.Styles.LabelStyles.ParcelLabelStyles.CurveLabelStyles) {
var s = Tx.GetObject(sid, OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
if (s == null) continue;
Log("");
Log("STYLE \"" + safe(() => s.Name) + "\" erased=" + s.IsErased);
foreach (ObjectId cid in s.GetComponents(Autodesk.Civil.DatabaseServices.Styles.LabelStyleComponentType.Text)) {
var c = Tx.GetObject(cid, OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Styles.LabelStyleTextComponent;
if (c == null) continue;
Log(" \"" + safe(() => c.Name) + "\" visible=" + safe(() => c.General.Visible.Value.ToString()));
}
}
Result
Log
STYLE "Delta over Length and Radius" erased=False
"Table Tag" visible=True
"Distance & Radius" visible=True
"Delta" visible=True
STYLE "Standard" erased=False
"Table Tag" visible=True
"Distance and Radius" visible=TrueNotes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.