PointLocation Example

Land Auto

PointLocation Example

Sub Example_PointLocation()
    
    ' This example gets the PointLocation from user supplied values
    ' for the first Alignment in the collection.
    Dim align As AeccAlignment
    Set align = AeccApplication.ActiveProject.Alignments.Item(0)
    
    Dim station As Double
    Dim offset As Double
    Dim easting As Double
    Dim northing As Double
    Dim direction As Double
    
    ' Get the station and the offset
    station = ThisDrawing.Utility.GetReal("Enter the station for the point: ")
    offset = ThisDrawing.Utility.GetReal("Enter the offset for the point: ")
    
    ' Get the point location
    align.PointLocation station, offset, easting, northing, direction
    
    MsgBox "The Point Location is:" & vbCrLf & _
        "   Easting: " & easting & vbCrLf & _
        "   Northing: " & northing & vbCrLf & _
        "   Direction: " & direction, vbInformation, "PointLocation Example"
    
End Sub