Jump to content

change start and end point of polyline and change mid points relevently


Recommended Posts

Posted

I hve alisp program to mark chainages of polyline.

But always  the start point and end point is same. I want to change direction of cranages as showen in  the picture.  Can some one help me to change polyline properties to full fill this task.

POLYLINE.PNG

Posted

PEDIT command has the option to revert the polyline. However, you have to run the lisp once, then, if require revert, you have to UNDO the lisp, revert the polyline, then run the lisp again.

IMO, the chainage lisp should decide the starting point based on the selection point.

  • Thanks 1
Posted

There is also the  "reverse" command.

To work with lines that require specific direction  I typical temporally change the object line type this custom linetype -->--->---> ... and once I'm done with task I re-set back to by-layer.

 

arrow.lin

Posted (edited)

This will reverse a pline if required. I would also look at Lee-mac "Text readable.lsp" as some of your text is up is up side down.

 

(setq ent (entsel "\npick a line near end "))
(setq obj (vlax-ename->vla-object (car ent)))
(setq startpt (vlax-curve-getstartPoint obj))
(setq endpt (vlax-curve-getEndPoint obj))
(setq pt1 (cadr ent))
(setq d1 (distance pt1 startpt))
(setq d2 (distance pt1 endpt))
(if (< d1 d2)
  (command "pedit" (car ent) "R" "")
)

 

Edited by BIGAL
Posted

To change the origin and/or direction of a polyline, I recommend this excellent Lisp of Giampaolo Cattaneo.CHVERT.LSP

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