Here ya go, Brian. I create a 550' long alignment from a polyline, set the ReferenceStation to 20+00, then run a loop at 100' increments to get the location of the station.
[CommandMethod("TestAlignStations")]
public void testalignstations()
{
Document doc = Application.DocumentManager.MdiActiveDocument;
Database db = doc.Database;
Editor ed = doc.Editor;
CivilDocument civdoc = CivilApplication.ActiveDocument;
using (Transaction tr = db.TransactionManager.StartTransaction())
{
Polyline pline = new Polyline(2);
pline.AddVertexAt(0, new Point2d(0, 0), 0, 0, 0);
pline.AddVertexAt(1, new Point2d(0, 550), 0, 0, 0);
BlockTable bt = (BlockTable)db.BlockTableId.GetObject(OpenMode.ForRead);
BlockTableRecord btr = (BlockTableRecord)bt[BlockTableRecord.ModelSpace].GetObject(OpenMode.ForWrite);
btr.AppendEntity(pline);
tr.AddNewlyCreatedDBObject(pline, true);
ObjectId layerId = db.Clayer;
ObjectId siteId = ObjectId.Null;
ObjectId alignStyle = civdoc.Styles.AlignmentStyles["Standard"];
ObjectId alignStyleSet = civdoc.Styles.LabelSetStyles.AlignmentLabelSetStyles["Standard"];
PolylineOptions pOpts = new PolylineOptions();
pOpts.AddCurvesBetweenTangents = false;
pOpts.EraseExistingEntities = true;
pOpts.PlineId = pline.ObjectId;
Alignment align = (Alignment)Alignment.Create(civdoc, pOpts, "TestAlignment", siteId, layerId, alignStyle, alignStyleSet).GetObject(OpenMode.ForWrite);
align.ReferencePointStation = 2000;
for (double i = align.StartingStation; i < align.EndingStation; i += 100)
{
double n = 0, e = 0;
align.PointLocation(i, 0, ref n, ref e);
ed.WriteMessage("\nStation {0} is located at {1}, {2}", align.GetStationStringWithEquations(i), n.ToString("F2"), e.ToString("F2"));
}
tr.Commit();
}
}