Jump to content

Draw point along polyline, given length


declys

Recommended Posts

To draw a point along selected polyline you can use Divide command or Measure command or use the Auto Lips to combine the steps to a new Lisp routine.

To give the length of polyline you can refer this following file:

Hope this helps

Cheer!!

ADDLEN.lsp

Link to comment
Share on other sites

you could try this

;places point at specified station along a polyline, measured from start LPS 2008

(defun c:pop ()
(vl-load-com)
(setq oldosnap (getvar "osmode"))
(setvar "osmode" 0)
(command "ucs" "w")
(setvar "pdmode" 3); if your pdmode is already set to what you want, remove or comment this line
(setq ob (entsel "Select curve: "))
(setq p2 (getreal "\n Specify Distance : "))
(setq obj (vlax-ename->vla-object (car ob)))
(setq pt1 (vlax-curve-getPointAtDist Obj p2))
(command "Point" pt1)
(command "ucs" "p")
(setvar "osmode" oldosnap)
(princ)
)

Link to comment
Share on other sites

  • 3 years later...

calculate the Length off a polyline from begin till a point

 

I want to know the length of a line from the begin till the point where

I click or where the line cross a other line.

I can get the line and i can find where the intersection points are

with VBA but I can NOT find a function that calculate the the exact

length from begin to the intersection.

Can anyone help me to find the good way.

 

thank u all,

Link to comment
Share on other sites

Try using a combination of these:

 

Start Point: (vlax-curve-getstartpoint Obj)

End Point: (vlax-curve-getendpoint Onj)

Distance at Point: (vlax-curve-getDistAtPoint Obj pt)

Intersection: (vlax-invoke Obj 'IntersectWith Obj2 acExtendNone)

 

And then subtract distance between your start point and distance at your intersection point/click point.

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...