CenterNorthing Example

Land Auto

CenterNorthing Example

Examples:

l AlignCurve

l ParcelCurve


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

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