MinElevation Example

Land Auto

MinElevation Example

Examples:

l CrossSection

l Surface


Sub Example_MinElevation_CrossSection()
    
    ' This example returns the minimum elevation 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 elevation for the cross section at station " & station & " is: " & _
        Format(xSect.MinElevation, "0.00"), vbInformation, "MinElevation Example"
    
End Sub

Sub Example_MinElevation_Surface()
    
    ' This example returns the MinElevation for the first surface in the collection.
    Dim surf As AeccSurface
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    
    MsgBox "The MinElevation for surface  " & surf.Name & " is: " & Format(surf.MinElevation, "0.00"), _
        vbInformation, "MinElevation Example"
    
End Sub