PiNorthing Example

Land Auto

PiNorthing Example

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