Jump to content

Convert Lines to Polylines


how do i do this?

Recommended Posts

Jack_O'neill

Check the help files on how to use the "pedit" command. It will convert a line into a polyline, and then you can join other segments, edit the width, etc.

Link to post
Share on other sites
Jack_O'neill
There's also a Join command.

 

Join will take line segments that are collinear and turn them into one selectable object but it doesn't turn lines into polylines. Arcs have to lie on the same imaginary circle, and it won't join a line to an arc.

Link to post
Share on other sites
... Arcs have to lie on the same imaginary circle' date=' and it won't join a line to an arc.[/quote']

 

FWIW: 2012 will join an arc to a line, creating a pline in the process.

Link to post
Share on other sites
Jack_O'neill
FWIW: 2012 will join an arc to a line, creating a pline in the process.

 

The join option of Pedit does this, but i'd have to look into the future for your version. I'm stuck in 2010! :D

Link to post
Share on other sites

There are two ways to do this:

 

1- I always find this procedure the easiest: use MPEDIT, select the lines, convert to polylines (YES), select JOIN and when it ask you to enter a fuzz distance just press ENTER and then press ESC to complete the process.

 

2- If you have an enclosed area that consist of lines, use the BOUNDARY (BO) command to convert those lines into polylines.

Link to post
Share on other sites
Joseph Marquez

So I type in MPEDIT in the command line and I select the lines, what do I do after that? It keeps asking me all these different questions.

Link to post
Share on other sites
So I type in MPEDIT in the command line and I select the lines, what do I do after that? It keeps asking me all these different questions.

 

You answer Yes, enter, enter. Done.

Link to post
Share on other sites

PEDIT is clunky .... PolyJoin is sleek

 

;;---------------------=={ Polyline Join }==------------------;;
;;                                                            ;;
;;  Attempts to join all Lines, Arcs and LWPolylines in a     ;;
;;  selection.                                                ;;
;;------------------------------------------------------------;;
;;  Author: Lee Mac, Copyright © 2011 - www.lee-mac.com       ;;
;;------------------------------------------------------------;;

(defun c:pj nil (c:PolyJoin))

(defun c:PolyJoin ( / *error* _StartUndo _EndUndo vl ov ss )
 (vl-load-com)
 ;; © Lee Mac 2011

 (defun *error* ( msg )
   (if ov  (mapcar 'setvar vl ov))
   (if doc (_EndUndo doc))
   (or (wcmatch (strcase msg) "*BREAK,*CANCEL*,*EXIT*")
       (princ (strcat "\n** Error: " msg " **"))
   )
   (princ)
 )

 (defun _StartUndo ( doc ) (_EndUndo doc)
   (vla-StartUndoMark doc)
 )

 (defun _EndUndo ( doc )
   (if (= 8 (logand 8 (getvar 'UNDOCTL)))
     (vla-EndUndoMark doc)
   )
 )

 (setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
 (_StartUndo doc)
 
 (setq vl '("CMDECHO" "PEDITACCEPT") ov (mapcar 'getvar vl))
 (mapcar 'setvar vl '(0 1))

 (if (setq ss (ssget "_:L" '((0 . "LINE,ARC,LWPOLYLINE"))))
   (command "_.pedit" "_M" ss "" "_J" "" "")
 )

 (mapcar 'setvar vl ov)
 (_EndUndo doc)
 (princ)
)

Link to post
Share on other sites

Typical autocad, theres usually more than one way to do something. The PE - JOIN process works as long as the lines you are joining together have the same beginning and end point, like if you were to draw several lines continouly. You can also connect multiple lines together that do not have the same beginning and end points connected by converting one line into a PLINE and using the FILLET - MULTIPLE command, select each end of two lines you want to join together, this will create the connected lines into a PLINE as long as the first one you select is a PLINE. You can also set a radius to the fillet, which is handy when you need to create a known radius that is tangent to two lines, like at road intersections.

Link to post
Share on other sites
....

You can also connect multiple lines together that do not have the same beginning and end points connected by converting one line into a PLINE and using the FILLET - MULTIPLE command, select each end of two lines you want to join together, this will create the connected lines into a PLINE as long as the first one you select is a PLINE. ...

 

This is no longer true, you don't need to convert a line to pline first, and you don't have to use fillet. If you have two lines say at 90 degrees to one another and not touching by 6 inches, start PE, Mulitple, pick, join, fuzzfactor >6, finished. They are now one pline.

Edited by rkent
clarified fuzzfactor value
Link to post
Share on other sites
This is no longer true, you don't need to convert a line to pline first, and you don't have to use fillet. If you have two lines say at 90 degrees to one another and not touching by 6 inches, start PE, Mulitple, pick, join, fuzzfactor or 8, finished. They are now one pline.

 

Cool, thats going to be especially helpful when the lines have different elevations.

Link to post
Share on other sites
Cool, thats going to be especially helpful when the lines have different elevations.

 

I don't think so.... you can't join line segments that can't define a single plane.

Link to post
Share on other sites
  • 2 years later...
  • 2 years later...
TheCADnoob
Check the help files on how to use the "pedit" command. It will convert a line into a polyline' date=' and then you can join other segments, edit the width, etc.[/quote']

 

just what the dr ordered :)

Link to post
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
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...