cat3appr Posted February 17, 2018 Share Posted February 17, 2018 Hello 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! Quote Link to comment Share on other sites More sharing options...
BIGAL Posted February 18, 2018 Share Posted February 18, 2018 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) (progn (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))) ) ) ) ) (ptsatdist) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.