Type Example

Land Auto

Type Example

Examples:

l AlignEntity, AlignCurve, AlignCurve, AlignTangent

l Boundary

l Breakline

l CrossSectionSurface (Civil Engineering Feature)

l EGProfile (Civil Engineering Feature)

l FGProfile (Civil Engineering Feature)

l ParcelEntity, ParcelCurve, ParcelLine

l StationEquation

l Surface

l Watershed


Sub Example_Type_AlignEntity()
    
    ' This example returns the Type setting for the first entity in the
    ' first Alignment in the collection.
    Dim align As AeccAlignment
    Dim alignEnt As AeccAlignEntity
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    Set alignEnt = align.AlignEntities.Item(0)
    
    Dim alignType As String
    
    Select Case alignEnt.Type
    Case kCurve
        alignType = "Curve"
    Case kSpiral
        alignType = "Spiral"
    Case kTangent
        alignType = "Tangent"
    End Select
    
    MsgBox "The Type for the first entity in the alignment is: " & alignType _
        , vbInformation, "Type Example"
    
End Sub

Sub Example_Type_Boundary()
    
    ' This example returns the Type
    ' for the first Boundary in the collection.
    Dim surf As AeccSurface
    Dim bound As AeccBoundary
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set bound = surf.Inputs.Boundaries.Item(0)
    
    Dim bndType As String
    
    Select Case bound.Type
    Case kBoundaryTypeShow
        bndType = "Visible"
    Case kBoundaryTypeHide
        bndType = "Hidden"
    Case kBoundaryTypeOuter
        bndType = "Outer"
    End Select
    
    MsgBox "The Type for the first Boundary is: " & bndType _
        , vbInformation, "Type Example"
    
End Sub

Sub Example_Type_BreakLine()
    
    ' This example returns the Type
    ' for the first BreakLine in the collection.
    Dim surf As AeccSurface
    Dim brkLine As AeccBreakLine
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set brkLine = surf.Inputs.BreakLines.Item(0)
    
    Dim brkType As String
    
    Select Case brkLine.Type
    Case kStandaed
        brkType = "Standard"
    Case kProximety
        brkType = "Proximity"
    Case kWallLeft
        brkType = "Wall Left"
    Case kWallRight
        brkType = "Wall Right"
    Case kNondestructive
        brkType = "Non Destructive"
    End Select
    
    MsgBox "The Type for the first BreakLine is: " & brkType _
        , vbInformation, "Type Example"
    
End Sub

Sub Example_Type_CrossSectionSurface()
    
    ' This example returns the surface type for the first cross
    ' section surface in the collection for the first cross section
    ' in the collection.
    Dim aligns As AeccAlignments
    Dim align As AeccAlignment
    Dim xSect As AeccCrossSection
    Dim xSectSurf As AeccCrossSectionSurface
    Set aligns = AeccApplication.ActiveProject.Alignments
    Set align = aligns.Item(0)
    Set xSect = align.CrossSections.Item(0)
    Set xSectSurf = xSect.CrossSectionSurfaces.Item(0)
    
    '  Get the alignment name
    Dim alignName As String
    alignName = align.Name
    
    ' Get the cross section station and format it
    Dim station As String
    station = aligns.DoubleToStaFormat(xSect.station)
    
    ' Get the cross section surface name
    Dim surfName As String
    surfName = xSectSurf.Name
    
    ' Get the cross section surface type
    Dim xSurfType As String
    
    Select Case xSectSurf.Type
    Case kExistingGround
        xSurfType = "Existing Ground"
    Case kTopSurface
        xSurfType = "Top Surface"
    Case kDatumSurface
        xSurfType = "Datum Surface"
    Case kTemplateSurface
        xSurfType = "Template Surface"
    Case kSubassemblySurface
        xSurfType = "Subassembly Surface"
    Case kMatchSurface
        xSurfType = "Match Surface"
    End Select
    
    MsgBox "The alignment name is: " & alignName & vbCrLf & _
        "The first cross section is at station: " & station & vbCrLf & _
        "The first surface name is: " & surfName & vbCrLf & _
        "The first surface type is: " & xSurfType, vbInformation , "Type Example"
    
End Sub

Sub Example_Type_EGProfile()
    
    ' This example returns the Type setting for the first existing ground profile
    ' in the first alignment in the collection.
    Dim align As AeccAlignment
    Dim EGProf As AeccEGProfile
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    Set EGProf = align.EGProfiles.Item(0)
    
    Dim EGProfType As String
    
    Select Case EGProf.Type
    Case kEgCenter
        EGProfType = "Center"
    Case kEgLeft
        EGProfType = "Left"
    Case kEgNone
        EGProfType = "None"
    Case kEgRight
        EGProfType = "Right"
    End Select
    
    MsgBox "The Type for the first existing ground profile in the alignment is: " & EGProfType _
        , vbInformation, "Type Example"
    
End Sub

Sub Example_Type_FGProfile()
    
    ' This example returns the Type setting for the finished ground profile
    ' in the first alignment in the collection.
    Dim align As AeccAlignment
    Dim FGProf As AeccFGProfile
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    Set FGProf = align.FGProfiles.Item(0)
    
    Dim FGProfType As String
    
    Select Case FGProf.Type
    Case kFgCenter
        FGProfType = "Center"
    Case kFgDitchLeft
        FGProfType = "Ditch Left"
    Case kFgDitchRight
        FGProfType = "Ditch Right"
    Case kFgLeft1
        FGProfType = "Left 1"
    Case kFgLeft2
        FGProfType = "Left 2"
    Case kFgLeft3
        FGProfType = "Left 3"
    Case kFgLeft4
        FGProfType = "Left 4"
    Case kFgLeft5
        FGProfType = "Left 5"
    Case kFgLeft6
        FGProfType = "Left 6"
    Case kFgLeft7
        FGProfType = "Left 7"
    Case kFgLeft8
        FGProfType = "Left 9"
    Case kFgNone
        FGProfType = "None"
    Case kFgRight1
        FGProfType = "Right 1"
    Case kFgRight2
        FGProfType = "Right 2"
    Case kFgRight3
        FGProfType = "Right 3"
    Case kFgRight4
        FGProfType = "Right 4"
    Case kFgRight5
        FGProfType = "Right 5"
    Case kFgRight6
        FGProfType = "Right 6"
    Case kFgRight7
        FGProfType = "Right 7"
    Case kFgRight8
        FGProfType = "Right 8"
    End Select
    
    MsgBox "The Type for the finished ground profile in the alignment is: " & FGProfType _
        , vbInformation, "Type Example"
    
End Sub

Sub Example_Type_ParcelEntity()
    
    ' This example returns the Type for the first entity in the
    ' first Parcel in the collection.
    Dim parcel As AeccParcel
    Dim parcelEnt As AeccParcelEntity
    Set parcel = AeccApplication.ActiveProject.Parcels.Item(0)
    Set parcelEnt = parcel.ParcelEntities.Item(0)
    
    Dim parcelType As String
    
    Select Case parcelEnt.Type
    Case kParcelCurve
        parcelType = "Curve"
    Case kParcelLine
        parcelType = "Line"
    End Select
    
    MsgBox "The Type of the first entity in the Parcel is: " & parcelType, _
        vbInformation, "Type Example"
    
End Sub

Sub Example_Type_StationEquation()
    
    ' This example returns the Type setting for StationEquation.
    Dim align As AeccAlignment
    Dim staEqu As AeccStationEquation
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    Set staEqu = align.StationEquations.Item(0)
    
    ' Convert the type to a string.
    Select Case staEqu.Type
    Case kIncreasing
        staType = "Station Equation increases stationing."
    Case kDecreasing
        staType = "Station Equation decreases stationing."
    End Select
    
    MsgBox "The current value for Type is " & staType, vbInformation, "Type Example"
    
End Sub

Sub Example_Type_Surface()
    
    ' This example returns the Type for the first surface in the collection.
    Dim surf As AeccSurface
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    
    Dim surfType as String
    
    ' Convert the type to a string.
    Select Case surf.Type
    Case kUnknownSurface
        surfType = "The surface type is Unknown."
    Case kTin
        surfType = "The surface type is Surface."
    Case kCompositeVolumn
        surfType = "The surface type is Composite Volume."
    Case kGridVolumn
    surfType = "The surface type is Grid Volume."
    End Select
    
    MsgBox surfType, vbInformation, "Type Example"
    
End Sub

Sub Example_Type_Watershed()
    
    ' This example returns the Type or Watershed
    ' for the first WaterShed in the collection.
    Dim surf As AeccSurface
    Dim wShed As AeccWaterShed
    Set surf = AeccApplication.ActiveProject.Surfaces.Item(0)
    Set wShed = surf.Outputs.WaterSheds.Item(0)
    
    Dim wShedType As String
    
    Select Case wShed.Type
    Case kBoundaryPoint
        wShedType = "includes a boundary point."
    Case kBoundarySegment
        wShedType = "includes part of a boundary."
    Case kLocalMin
        wShedType = "is a depression."
    Case kFlatArea
        wShedType = "has a flat area."
    Case kMultiDrain
        wShedType = "has multiple drains."
    End Select
    
    MsgBox "The first WaterShed " & wShedType, vbInformation, "Type Example"
    
End Sub