C3D 2012
dot net
c#
what is the method to create a superelevation curve in an alignment?
When I try to apply this:
Alignment align1 = ts.GetObject(per1.ObjectId, OpenMode.ForWrite) as Alignment;
align1.SuperelevationCriticalStations.Add(align1.StartingStation, SuperelevationCriticalStationType.BeginNormalCrown);
I get error: Value does not fall within the expected range
I'm guessing the error is caused by the fact that the selected alignment has no superelevation curves.
Thx.
Kevin.
Solved! Go to Solution.
Solved by kbarnettza. Go to Solution.
Hi Kevin,
I think the following post in http://adndevblog.typepad.com/infrastructure/ will be useful to you.
Want to Add a SuperelevationCriticalStation using Civil 3D .NET API ?
Hope this helps.
Thanks,
SuperelevationCriticalStationCollection criteriaStationColl = align.SuperelevationCriticalStations;
criteriaStationColl.Add(station, SuperelevationCriticalStationType.BeginNormalCrown);
no. method only adds if the station is within the start and end of the alignment.
method does not allow adding at the start and end stations of the alignment.
but ... u can adjust the station values of critical super positions ...
so ... current tested and implemented workaround is to...
add the start and end stations slightly within the alignment then set the station value of these back to the correct start and end stations after creating the critical super positions