can i use the "methods supported" " FindXYAtStationAndElevation" to retrieve a elevation and station from a profile view?
someone had posted this ...... i tried and it doesnt work
so my search continues
anyone?
(defun C:getsta ()
(setq ProfView (vlax-ename->vla-object (car (nentsel "\nSelect Profile View "))))
(setq pt1 (getpoint "\nSelect Point "))
(setq pt1X (car pt1))
(setq Pt1Y (cadr pt1))
(setq pstation 1.0)
(setq pelevation 1.0)
(vlax-invoke profview 'FindStationandElevationatXY (pt1x, pt1y, pstation, pelevation))
(vlax-invoke profview 'FindStationandElevationatXY pt1x pt1y 'pstation 'pelevation 'inbounds)
)
ssm-jt,
if you attach a sample dwg, with your profile view and some notes about what you need, is easiest somebody could help you.
Henrique
I found the answer at
https://www.theswamp.org/index.php?topic=49878.0
The correct code is below.
(defun c:get_prof_elev (/)
(setq profview (vlax-ename->vla-object (car (nentsel "\nSelect Profile View "))))
(setq pt1 (getpoint "\nSelect Point "))
(setq pt1x (car pt1))
(setq pt1y (cadr pt1))
(setq staoff (vlax-invoke-method profview 'FindStationAndElevationAtXY pt1x pt1y 'sta 'elev))
(print sta)
(print elev)
(princ)
)
(princ)