Take a look at the following code. It's from the vba reference:
Copyright - Autodesk
Sub Example_StationElevationToXy()
' This example returns the StationElevationToXy for the first ProfileBlock
in the collection.
Dim alignProf As AeccProfileBlock
Set alignProf = AeccApplication.ActiveDocument.ProfileBlocks.Item(0)
Dim StaElev(0 To 1) As Double
Dim XY As Variant
Dim station As Double, elevation As Double
'Get the station and the elevation
station = ThisDrawing.Utility.GetReal("Enter the station for the X value: ")
elevation = ThisDrawing.Utility.GetReal("Enter the elevation for the Y
value: ")
' Use the entered values to get the X and Y values
staElev(0) = station
staElev(1) = elevation
XY = alignProf.StationElevationToXy(staElev)
MsgBox "The X value for the StationElevation is: " & Format(XY(0), "0.00") &
vbCrLf & _
"The Y value for the StationElevation is: " & Format(XY(1), "0.00") _
, vbInformation, "StationElevationToXy Example"
End Sub
Good luck,
Drew Burgasser
CAD Masters, Inc.
www.cadmasters.com
"BigCountry" wrote in message
news:f0d4380.-1@WebX.maYIadrTaRb...
Hi all!
I need a little guidance on a program that I'm working on. I want to be able
to pick a point on an alignment and have LDT make a point on a corresponding
profile. I can set the alignment current and verify if a corresponding
profile exists, but.... that's as far as I can go. I haven't dabbled too
much in the LDT VBA, so any help would be greatly appreciated.
Thanks in advance!
- Matt