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