CenterlineOffset Example

Land Auto

CenterlineOffset Example

Sub Example_CenterlineOffset()
    
    ' This example returns the centerline offset for the
    ' first alignment cross section in the collection.
    Dim alignXSects As AeccCrossSectionBlocks
    Dim alignXSect As AeccCrossSectionBlock
    Set alignXSects = AeccApplication.ActiveDocument.CrossSectionBlocks
    Set alignXSect = alignXSects.Item(0)
    
    'Get the station for the first alignment cross section in the collection
    Dim station As String
    station = alignXSect.station
    
    MsgBox "The centerline offset for the alignment cross section at station " & station & " is: " & _
        Format(alignXSect.CenterlineOffset, "0.00"), vbInformation, "Height Example"
    
End Sub