SectionByStation Example
Sub Example_SectionByStation()
' This example returns a cross section by providing the station
' to the first alignment in the collection.
Dim align As AeccAlignment
Dim xSects As AeccCrossSections
Dim xSect As AeccCrossSection
Set align = AeccApplication.ActiveProject.Alignments.Item(0)
Set xSects = align.CrossSections
' Get the station for the first cross section in the cross section collection
Dim station As Double
station = xSects.Item(0).station
' Get the cross section block for the station set above
Set xSect = xSects.SectionByStation(station)
MsgBox "The maimum elevation for the cross section at station " & station & " is: " & _
Format(xSect.MaxElevation, "0.00"), vbInformation, "SectionByStation Example"
End Sub