In AutoCAD Civil 3D, SuperelevationCriticalStation class represents a super-elevation critical station on an Alignment object. And SuperelevationCriticalStationCollection class represents a collection of SuperelevationCriticalStation objects. SuperelevationCriticalStationCollection.Add() method adds a SuperelevationCriticalStation of the specified transition type at the specified station. For the list of SuperelevationCriticalStationType members, take a look into the SuperelevationCriticalStationType Enumeration in Civil 3D .NET API Reference document.
Here is a C# code snippet which demonstrates how to add a new critical station at a specified station value (double) with a SuperelevationCriticalStationType of BeginNormalCrown :
using (Transaction trans = db.TransactionManager.StartTransaction())
{
Alignment align = trans.GetObject(alignmentId, OpenMode.ForWrite) as Alignment;
// get the critical station collection on the aligment.
SuperelevationCriticalStationCollection criteriaStationColl = align.SuperelevationCriticalStations;
// add a new critical station at the station 1000.00 with a type BeginNormalCrown.
// values used below can be tested using Civil 3D Tutorial sample DWG file - "Align-Superelevation-1.dwg "
criteriaStationColl.Add(1000.00, SuperelevationCriticalStationType.BeginNormalCrown);
// get the critical station at the station 1000.00.
SuperelevationCriticalStation scs1000 = criteriaStationColl.GetCriticalStationAt(1000.00, 0.01);
scs1000.SetSlope(SuperelevationCrossSegmentType.LeftOutLaneCrossSlope, 0.05);
//....
trans.Commit();
}
And you are expected to see a result similar to this :
Hope this helps !


Leave a Reply to joantopoCancel reply