Jump to content

auto create points on a polyline using the stationing of another line.


KJac

Recommended Posts

I'm trying to automatically create points on a polyline at every vertices or point of intersection as well as in 100 foot intervals. I have a LISP routine that does this, however my problem is that I need the points created on this line to line up with the stationing of my CL of construction.

 

If you look at the drawing screenshot, you will see the grey line that is my CL of construction with the 100ft interval stationing and the orange lines to the left and right of the CL. I am trying to create the points on these orange lines and have them line up with the stations on the CL.

 

attachment.php?attachmentid=56906&cid=1&stc=1

pencil.png

stationing.jpg

Link to comment
Share on other sites

This post has the answer known as peg&shift http://www.cadtutor.net/forum/showthread.php?95475-How-to-iterate-points-over-a-pline

Ps how do you work with a white screen so hard config display color

 

The programming is over my head and the guy doesn't seem to have finished his code. They talk about using heavy polylines only? mine are just regular 2d polylines.

Link to comment
Share on other sites

The code I posted in the related post is the solution to your question, you can nominate a distance along the 1st pline and a 90 degree lines extends out till it touches the 2nd pline and works out that intersection point. I will try to make it short to show how its done. You need to think about what is the desired result.

 

(defun c:sqoff ( / ob obj2 pt pt2 pt3)
(setq obj (vlax-ename->vla-object (car (entsel "\nPick pline1"))))
(setq obj2 (vlax-ename->vla-object (car (entsel "\nPick pline2"))))
(setq dist (getreal "enter chainage"))
(setq Pt (vlax-curve-getPointAtDist Obj dist))
(setq fd (vlax-curve-getFirstDeriv obj (vlax-curve-getparamAtPoint obj pt)))
(setq angR (- (angle '(0 0 0) fd) (* pi 0.5)))
(setq pt2 (polar pt angr 1.0))
(command "line" pt pt2 "")
(setq obj3 (vlax-ename->vla-object (entlast)))
(setq pt3 (vlax-invoke obj3 'intersectWith obj2 acExtendThisEntity))
(command "line" pt pt3 "")
(alert (strcat "Pt co-ords are " (rtos (nth 0 pt3) 2 3) "," (rtos (nth 1 pt3) 2 3)))
)
(c:sqoff)

Edited by BIGAL
Link to comment
Share on other sites

If you're using Civil 3D, and you already have an Alignment at centerline... Just use the ADDALIGNOFFXYLBL Command, and apply the appropriate Alignment Station Offset Label Style. :thumbsup:

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