Delta Example

Land Auto

Delta Example

Examples:

l AlignCurve

l AlignSpiral

l ParcelCurve


Sub Example_Delta_AlignCurve()
    
    ' This example returns the Delta for the first Curve found in the
    ' first Alignment in the collection.
    Dim align As AeccAlignment
    Dim alignEnts As AeccAlignEntity
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    
    Dim alignMsg As String
    alignMsg = "There is no Curve entity in the first Alignment."
    
    ' Find first Curve in the alignment
    For Each alignEnt In align.AlignEntities
        If alignEnt.Type = kCurve Then
            alignMsg = "The Delta for the first Curve in the alignment is: " _
            & Format(alignEnt.Delta, "0.00")
            Exit For
        End If
    Next
    
    MsgBox alignMsg, vbInformation, "Delta Example"
    
End Sub

Sub Example_Delta_AlignSpiral()
    ' This example returns the Delta for the first Spiral found in the
    ' first Alignment in the collection.
    Dim align As AeccAlignment
    Dim alignEnts As AeccAlignEntity
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    
    Dim alignMsg As String
    alignMsg = "There is no Spiral entity in the first Alignment."
    
    ' Find first Spiral in the alignment
    For Each alignEnt In align.AlignEntities
        If alignEnt.Type = kSpiral Then
            alignMsg = "The Delta for the first Spiral in the alignment is: " _
            & Format(alignEnt.Delta, "0.00")
            Exit For
        End If
    Next
    
    MsgBox alignMsg, vbInformation, "Delta Example"
    
End Sub

Sub Example_Delta_ParcelCurve()
    
    ' This example returns the Delta for the first curve 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 parcelMsg As String
    parcelMsg = "There is no Curve entity in the first Parcel."
    
    ' Find first Curve in the parcel
    For Each parcelEnt In parcel.ParcelEntities
        If parcelEnt.Type = kParcelCurve Then
            parcelMsg = "The Delta for the first Curve in the Parcel is: " _
            & Format(parcelEnt.Delta, "0.00")
        Exit For
        End If
    Next
    
    MsgBox parcelMsg, vbInformation, "Delta Example"
    
End Sub