Hello,
I am trying to use FindXYAtOffsetAndElevation for SectionViewObject via Lisp, but it fail.
I get error: ActiveX Server returned the error: unknown name: FindXYAtOffsetAndElevation
Instead when a use FindStationAndElevationAtXY I get correct result.
(defun offelev ( obj off elev / x y point)
(vlax-invoke-method obj'FindXYAtOffsetAndElevation 'off 'elev)
(setq point (list off elev))
;;example
(setq ent (car (entsel "\nSelect SectionView"))
obj(vlax-ename->vla-object ent)
off (vlax-get-property obj 'OffsetLeft)
elv (vlax-get-property obj 'ElevationMin)
)
(offelev ojb off elv)
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Functions with station in the name are for Profile Views. Maybe show the calling function.
.NET API
SectionView.FindOffsetAndElevationAtXY
SectionView.FindXYAtOffsetAndElevation
ProfileView.FindStationAndElevationAtXY
ProfileView.FindXYAtStationAndElevation
The method you are specifying does not exist. Try this:
(defun offelev ( obj sta off elev / x y point)
(vlax-invoke-method obj 'FindXYAtStationOffsetAndElevation sta off elev 'x 'y 'inside)
(setq point (list off elev))
)
;;example
(setq ent (car (entsel "\nSelect SectionView"))
obj(vlax-ename->vla-object ent)
off (vlax-get-property obj 'OffsetLeft)
elev (vlax-get-property obj 'ElevationMin)
sta (vlax-get (vlax-get obj 'parent) 'station)
)
(offelev obj sta off elev)
Thanks @Jeff_M,
I was looking 'FindXYAtStationOffsetAndElevation at http://docs.autodesk.com/CIV3D/2019/ENU/API_Reference_Guide/index.html and its is not expose.
Another question, ' inside arguments which mean? At API help this is not show.
Regards,
thank you sir @Jeff_M
Hello @davilavanegas
you was looking 'FindXYAtStationOffsetAndElevation at use lisp
Thanks @hosneyalaa,
I am clear Rightnow. I Could use pInBounds to ckecks if is insdide section view limits.
Regards,
I'm sorry, I don't have an answer ,master @davilavanegas
But the master @Jeff_M
He has the solution to all problems, and I learn from him
Can't find what you're looking for? Ask the community or share your knowledge.