Radius Example

Land Auto

Radius Example

Examples:

l AlignCurve

l ParcelCurve


Sub Example_Radius_AlignCurve()
    
    ' This example returns the Radius 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 Radius for the first Curve in the alignment is: " _
            & Format(alignEnt.Radius, "0.00")
            Exit For
        End If
    Next
    
    MsgBox alignMsg, vbInformation, "Radius Example"
    
End Sub

Sub Example_Radius_ParcelCurve()
    
    ' This example returns the Radius 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 Radius for the first Curve in the Parcel is: " _
            & Format(parcelEnt.Radius, "0.00")
        Exit For
        End If
    Next
    
    MsgBox parcelMsg, vbInformation, "Radius Example"
    
End Sub