XyToStationElevation Example
Sub Example_XyToStationElevation()
' This example returns the XyToStationElevation for the first ProfileBlock
' in the collection
Dim alignProf As AeccProfileBlock
Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
Dim staElev As Variant
Dim returnPnt As Variant
' Get a point in the alignment profile.
returnPnt = ThisDrawing.Utility.GetPoint(, "Enter a point in the alignment profile: ")
staElev = alignProf.XyToStationElevation(returnPnt)
MsgBox "The Station for the X value is: " & Format(staElev(0), "0.00") & vbCrLf & _
"The Elevation for the Y Value is: " & Format(staElev(1), "0.00") _
, vbInformation, "XyToStationElevation Example"
End Sub