EastNorthToXy Example

Land Auto

EastNorthToXy Example

Sub Example_EastNorthToXy()
    
    'This example returns the X and Y for a Easting Northing.
    Dim util As AeccUtility
    Set util = AeccApplication.ActiveDocument.Utility
    
    Dim var1 As Variant
    Dim ptEN(0 To 2) As Double
    Dim ptXY (0 To 2) As Double
    Dim str As String
    
    ptEN(0) = 1000
    ptEN(1) = 1000
    ptEN(2) = 0
    
    ' Convert point to X, Y
    var1 = util.EastNorthToXy(ptEN)
    
    ptXY(0) = var1(0)
    ptXY(1) = var1(1)
    ptXY(2) = var1(2)
    
    ' Make display string
    str = Format(ptXY(0), "0.00") + ", " + Format(ptXY(1), "0.00") + ", " +  Format(ptXY(2), "0.00")
    MsgBox "Point: " & str , vbInformation, "EastNorthXy Example"
    
End Sub