C3D-0231 · 260612 Springdale: Civil 3D objects/styles for a profile view done
READ-ONLY. Alignments, surfaces, ProfileView/Profile styles, pipe networks.
C# payload
// READ-ONLY: what Civil 3D infrastructure exists for a real ProfileView?
var cdoc = CivilApplication.ActiveDocument;
Log("alignments: " + cdoc.GetAlignmentIds().Count);
foreach (ObjectId id in cdoc.GetAlignmentIds()) {
var a = (Alignment)Tx.GetObject(id, OpenMode.ForRead);
Log(string.Format(" ALIGN {0} len={1:F2} sta {2:F2}-{3:F2}", a.Name, a.Length, a.StartingStation, a.EndingStation));
}
Log("surfaces: " + cdoc.GetSurfaceIds().Count);
foreach (ObjectId id in cdoc.GetSurfaceIds()) {
var s = (Autodesk.Civil.DatabaseServices.Surface)Tx.GetObject(id, OpenMode.ForRead);
Log(" SURFACE " + s.Name);
}
var ss = cdoc.Styles;
Log("ProfileViewStyles: " + ss.ProfileViewStyles.Count);
foreach (ObjectId id in ss.ProfileViewStyles) {
var st = (Autodesk.Civil.DatabaseServices.Styles.ProfileViewStyle)Tx.GetObject(id, OpenMode.ForRead);
Log(" PVSTYLE " + st.Name);
}
Log("ProfileStyles: " + ss.ProfileStyles.Count);
foreach (ObjectId id in ss.ProfileStyles) {
var st = (Autodesk.Civil.DatabaseServices.Styles.ProfileStyle)Tx.GetObject(id, OpenMode.ForRead);
Log(" PSTYLE " + st.Name);
}
Log("AlignmentStyles: " + ss.AlignmentStyles.Count);
try { Log("pipe networks: " + cdoc.GetPipeNetworkIds().Count); }
catch (System.Exception e) { Log("pipe networks: " + e.Message); }
Result
Log
alignments: 0 surfaces: 0 ProfileViewStyles: 11 PVSTYLE Intermediate View PVSTYLE Full Grid PVSTYLE Last View PVSTYLE Top Stacked View PVSTYLE Major Grids and HGP PVSTYLE Middle Stacked View PVSTYLE Bottom Stacked View PVSTYLE Profile View PVSTYLE Land Desktop Profile View PVSTYLE Major Grids PVSTYLE First View ProfileStyles: 7 PSTYLE Existing Ground Profile PSTYLE Left Sample Profile PSTYLE Intersection Basic PSTYLE Layout PSTYLE Basic PSTYLE Design Profile PSTYLE Right Sample Profile AlignmentStyles: 6 pipe networks: 0
Notes
What worked, what didn't, job-specific gotchas — flagged notes feed the recipes.
No notes yet.