Jump to content

extracting Easting Northing from a polyline


cat3appr

Recommended Posts

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!

Link to comment
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)
   (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)

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...