MinOffset Example

Land Auto

MinOffset Example

Sub Example_MinOffset()
    
    ' This example returns the minimum offset for the first cross section in the
    ' cross section collection for the first alignment in the collection.
    Dim aligns As AeccAlignments
    Dim align As AeccAlignment
    Dim xSect As AeccCrossSection
    Set aligns = AeccApplication.ActiveProject.Alignments
    Set align = aligns.Item(0)
    Set xSect = align.CrossSections.Item(0)
    
    ' Get the cross section station and format it
    Dim station As String
    station = aligns.DoubleToStaFormat(xSect.station)
    
    MsgBox "The minimum offset for the cross section at station " & station & " is: " & _
        Format(xSect.MinOffset, "0.00"), vbInformation, "MinOffset Example"
    
End Sub