C3DO-0781 · 261101 east/west line labels (read-only) [C3D-EWREAD] done
Read-only: style, text components, overrides and displayed text of parcel segment labels 2185B (west) and 2185D (east).
C# payload
foreach(var hs in new[]{"2185B","2185D"}){ ObjectId id; if(!Db.TryGetObjectId(new Handle(Convert.ToInt64(hs,16)),out id)){ Log(hs+" missing"); continue; }
var l=(Autodesk.Civil.DatabaseServices.Label)Tx.GetObject(id,OpenMode.ForRead);
var st=(Autodesk.Civil.DatabaseServices.Styles.LabelStyle)Tx.GetObject(l.StyleId,OpenMode.ForRead);
Log(hs+" "+l.GetType().Name+" style '"+st.Name+"' layer "+l.Layer);
foreach(ObjectId cid in st.GetComponents(Autodesk.Civil.DatabaseServices.Styles.LabelStyleComponentType.Text)){
var c=(Autodesk.Civil.DatabaseServices.Styles.LabelStyleTextComponent)Tx.GetObject(cid,OpenMode.ForRead);
string ov=""; try{ ov=l.GetTextComponentOverride(cid); }catch(System.Exception ex){ ov="ERR "+ex.Message; }
Log(" comp '"+c.Name+"' contents: "+c.Text.Contents.Value+" | override: "+ov); }
var col=new DBObjectCollection(); try{ l.Explode(col); foreach(Autodesk.AutoCAD.DatabaseServices.DBObject o in col){ if(o is MText) Log(" shows: "+((MText)o).Contents); else if(o is DBText) Log(" shows: "+((DBText)o).TextString); o.Dispose(); } }catch(System.Exception ex){ Log(" explode "+ex.Message); } }
Result
Log
2185B ParcelSegmentLabel style 'Bearing over Distance' layer C-PROP-LINE-TEXT comp 'Table Tag' contents: L<[Parcel Line Number]> | override: L<[Parcel Line Number]> comp 'Bearing' contents: <[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]> | override: <[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]> comp 'Distance' contents: <[Segment Length(Uft|P2|RN|AP|GC|UN|Sn|OF)]>' | override: <[Segment Length(Uft|P2|RN|AP|GC|UN|Sn|OF)]>' 2185D ParcelSegmentLabel style 'Bearing over Distance' layer C-PROP-LINE-TEXT comp 'Table Tag' contents: L<[Parcel Line Number]> | override: L<[Parcel Line Number]> comp 'Bearing' contents: <[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]> | override: <[Segment Direction(Udeg|FDMSdSp|MB|P4|RN|DSn|CU|AP|EN|DZY|OF)]> comp 'Distance' contents: <[Segment Length(Uft|P2|RN|AP|GC|UN|Sn|OF)]>' | override: <[Segment Length(Uft|P2|RN|AP|GC|UN|Sn|OF)]>'
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.