TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: donnieworld on January 19, 2023, 09:28:19 PM

Title: Elevation at Station
Post by: donnieworld on January 19, 2023, 09:28:19 PM
I have created a polyline that represents a profile along an alignment. Now, I need to create a lisp function to extract the elevation at a specified station.

More simply, I need to get Y at X on a polyline. X is not the distance along the polyline. Because I am working with a profile, I know the polyline will not intersect the X more than once.

Thanks, in advance :-)
Title: Re: Elevation at Station
Post by: BIGAL on January 19, 2023, 11:05:54 PM
Why not use a proper civil Add on for Bricscad that does way much more, Google "Civil Site Design".
Title: Re: Elevation at Station
Post by: donnieworld on January 20, 2023, 12:14:06 AM
We currently utilize Civil Site Design on BricsCAD and it works WONDERFULLY for road and subdivision design. I am a huge fan of CSD. However, we have several small design tasks that don't require full road design, the data management, and complexity of a CSD project.

I am trying to simplify and improve a couple of workflows utilizing BricsCAD Tins and a couple of lisp routines.
Title: Re: Elevation at Station
Post by: donnieworld on January 20, 2023, 05:36:17 AM
This is working fairly well. I am drawing a vertical line at the X location and using intersectwith to find the Y on the profile.

(setq nElev (cadr (vlax-invoke (vlax-ename->vla-object Prof) 'intersectwith vLine acextendnone)))