← Inbox

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.

Script file
C3D-0086.cs
Target
260612 · model space
Author
claude
Approved
yes · reviewer
Timeout
180s

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

Status
success
Drawing file
C:\Users\sanja\OneDrive\_SurveyDisco\260619 - 3625 Stonewall Tell Rd, Atlanta, GA 30349, USA\260619 - 3625 Stonewall Tell Rd.dwg
Message
Executed C3D-0086 (0 entities touched).
Entities
Duration
437 ms
Civil 3D
25.0.0.0

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=True

Notes

What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.

No notes yet.