C3DO-0742 · 261101 parcel segment API probe (read-only) [C3D-SEGPROBE] done
Read-only: list the members of parcel segment 214DE and its elements.
C# payload
ObjectId id; Db.TryGetObjectId(new Handle(Convert.ToInt64("214DE",16)),out id);
var s=Tx.GetObject(id,OpenMode.ForRead);
var t=s.GetType(); Log("type "+t.FullName+" base "+t.BaseType.FullName);
foreach(var m in t.GetMembers(System.Reflection.BindingFlags.Public|System.Reflection.BindingFlags.Instance|System.Reflection.BindingFlags.DeclaredOnly)) Log("M "+m.MemberType+" "+m.ToString());
var ep=t.GetProperty("Elements"); if(ep!=null){ var col=ep.GetValue(s) as System.Collections.IEnumerable; int i=0; foreach(var e in col){ var et=e.GetType(); Log("EL "+(i++)+" "+et.FullName); if(i==1) foreach(var p in et.GetProperties()) Log(" P "+p.Name+" "+p.PropertyType.Name+" set="+(p.SetMethod!=null&&p.SetMethod.IsPublic)); foreach(var nm in new[]{"StartPoint","EndPoint"}){ var pp=et.GetProperty(nm); if(pp!=null) Log(" "+nm+" "+pp.GetValue(e)); } } }
Result
Log
type Autodesk.Civil.DatabaseServices.ParcelSegment base Autodesk.Civil.DatabaseServices.Feature M Method Autodesk.AutoCAD.DatabaseServices.ObjectIdCollection GetAvailableParcelSegmentLabelIds()
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.