Jump to content

Need lisp that will create a polyline using end vertices of selected lines or plines


ceseme

Recommended Posts

I am using AutoCAD 2011. I have base dwgs from a surveyor who used broken lines to create entities in the drawing and I need to put them together in continuous polylines, so as I was tediously :cry: splicing them together, I began to wonder if there might be a lisp routine out there somewhere that would do this quickly for me. Thanks, anyone!

Link to comment
Share on other sites

These are line and or polyline segments with gaps about 10' apart, so PEdit and JOIN do not work. Tharwat, I tried your code, but nothing happened. But wow, you guys are fast at responding!

Link to comment
Share on other sites

Use the fuzz factor within PEdit or dig up the very old LISP routine called GLUE.

 

eg.

Command: pe
PEDIT Select polyline or [Multiple]: m

Select objects: Specify opposite corner: 3 found

Select objects:

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype 
gen/Reverse/Undo]: j
Join Type = Extend
Enter fuzz distance or [Jointype] <0.00>: 10

2 segments added to polyline

Enter an option [Close/Open/Join/Width/Fit/Spline/Decurve/Ltype 
gen/Reverse/Undo]:

Link to comment
Share on other sites

I have tried the PEdit/multiple/fuzz factor, but not all of the entites join using that command. The gaps do vary in length, but I don't know if that is a factor. The shorter gaps don't connect if I use a fuzz factor that is greater, regardless. If they have to be exact, that defeats the purpose, I would think. I have glue, but after I load it, it says GLUE is an unknown command, so I haven't been able to try that one.

Link to comment
Share on other sites

TEST.dwg

 

As you will see, I can't fillet most of these. That's why I wanted a lisp routine capable of selecting the end vertices of the existing plines to create a polyline that would replace these.

Link to comment
Share on other sites

It's hard to fillet lines that are not at angles to each other. Join only works if the ends of the lines touch, (and if they did, pedit would work!) The glue routine I have doesn't function. If I had a tried and true working lisp for glue I'd like to see if it would work for me. The times I tried PEdit/multiple using a large fuzz factor, not all of the lines selected connected, and some of them added vertices that doubled back on the pline.

Link to comment
Share on other sites

I take it the lines have different Z coordinates for their start and end points.

I know it's not ideal, but what if you just connected the gap with a line and then Pedit them?

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