Jump to content

extracting Easting Northing from a polyline

Recommended Posts




I have a polyline and I'd like to extract the easting northing coordinates at 1 meter interval, is it possible to do that?


ps no LIST command


I need to extract a point every meter


many thanks!

Share this post

Link to post
Share on other sites

Its a very simple task there is a vl function vlax-curve-getpointatdist which does just that. This can be expanded out to use with other objects like circle, arc & line, all in one routine.


(defun ptsatdist ( / obj dist distx pt)
 (setq obj (vlax-ename->vla-object (car (entsel "\nPick object"))))
 (setq dist 1.0)
 (setq distx dist)
 (if (/= (setq len (vla-get-length obj)) nil)
     (repeat (fix  (/ len dist))
     (princ "\n")
     (setq pt (vlax-curve-getpointatdist obj distx))
      (setq distx (+ distx dist))
      (princ (strcat (rtos distx 2 0) " X= " (rtos (car pt) 2 2) " Y= " (rtos (cadr pt) 2 2)))

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now