C3D-0082 · READ-ONLY: read inside the two parcel curve label styles [CURVE-STYLE-INSIDE] error
Reads the actual text components, their content templates, heights, colours and offsets, plus the leader arrowhead settings, inside Delta over Length and Radius and Standard - the style name does not have to match what it emits. No changes.
C# payload
// READ-ONLY. Look INSIDE the two parcel curve label styles. The style NAME does not have to
// describe what it emits - "Delta over Length and Radius" may have been edited to produce the
// ARC / CHD / bearing / RAD format. Read the actual text components and the leader settings.
// 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 st = Tx.GetObject(sid, OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Styles.LabelStyle;
if (st == null) continue;
Log("");
Log("=== STYLE \"" + safe(() => st.Name) + "\" ===");
// every text component and its content template - this is the format itself
try {
var comps = st.GetComponents(Autodesk.Civil.DatabaseServices.Styles.LabelStyleComponentType.Text);
Log(" text components: " + comps.Count);
foreach (ObjectId cid in comps) {
var c = Tx.GetObject(cid, OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Styles.LabelStyleTextComponent;
if (c == null) continue;
Log(" * \"" + safe(() => c.Name) + "\"");
Log(" Contents " + safe(() => c.Text.Contents.Value));
Log(" Height " + safe(() => c.Text.Height.Value.ToString()));
Log(" Color " + safe(() => c.Text.Color.Value.ToString()));
Log(" Attach " + safe(() => c.Text.Attachment.Value.ToString()));
Log(" XOffset " + safe(() => c.Text.XOffset.Value.ToString()));
Log(" YOffset " + safe(() => c.Text.YOffset.Value.ToString()));
}
} catch (System.Exception ex) { Log(" components: " + ex.Message); }
// leader settings
try {
Log(" -- leader --");
Log(" Visible " + safe(() => st.Properties.Leader.Visible.Value.ToString()));
Log(" ArrowType " + safe(() => st.Properties.Leader.ArrowheadType.Value.ToString()));
Log(" ArrowSize " + safe(() => st.Properties.Leader.ArrowheadSize.Value.ToString()));
Log(" Color " + safe(() => st.Properties.Leader.Color.Value.ToString()));
Log(" Shape " + safe(() => st.Properties.Leader.Shape.Value.ToString()));
} catch (System.Exception ex) { Log(" leader: " + ex.Message); }
}
Result
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.