Community
Civil 3D Customization
Welcome to Autodesk’s AutoCAD Civil 3D Forums. Share your knowledge, ask questions, and explore popular AutoCAD Civil 3D Customization topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

FindXYAtOffsetAndElevation API Via Lisp Fail

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
davilavanegas
1646 Views, 7 Replies

FindXYAtOffsetAndElevation API Via Lisp Fail

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)

 

 


______________________
RDV - Rinat Dávila Vanegas  | LinkedInYouTube | Facebook


7 REPLIES 7
Message 2 of 8
GTVic
in reply to: davilavanegas

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

Message 3 of 8
Jeff_M
in reply to: davilavanegas

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)
Jeff_M, also a frequent Swamper
EESignature
Message 4 of 8
Jeff_M
in reply to: Jeff_M

I dont know why my reply posted twice. Nor do I know why Autodesk thought the Station was needed since the SectionView selected is the one being worked with.
Jeff_M, also a frequent Swamper
EESignature
Message 5 of 8

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,

 


______________________
RDV - Rinat Dávila Vanegas  | LinkedInYouTube | Facebook


Message 6 of 8
hosneyalaa
in reply to: davilavanegas

thank you sir @Jeff_M 
Hello @davilavanegas 
you was looking 'FindXYAtStationOffsetAndElevation at use lisp 

 

http://docs.autodesk.com/CIV3D/2012/ENU/API_Reference_Guide/com/AeccXLandLib__IAeccSectionView__Find...

Message 7 of 8
davilavanegas
in reply to: hosneyalaa

Thanks @hosneyalaa,

 

I am clear Rightnow. I Could use pInBounds to ckecks if is insdide section view limits.

 

Regards,


______________________
RDV - Rinat Dávila Vanegas  | LinkedInYouTube | Facebook


Message 8 of 8
hosneyalaa
in reply to: davilavanegas

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.

Post to forums  

Rail Community


 

Autodesk Design & Make Report