ceseme Posted November 16, 2011 Share Posted November 16, 2011 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 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! Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 16, 2011 Share Posted November 16, 2011 PEdit or Join? Quote Link to comment Share on other sites More sharing options...
Tharwat Posted November 16, 2011 Share Posted November 16, 2011 I guess this is enough to do the trick . (defun c:TesT (/ ss) (if (setq ss (ssget '((0 . "LINE")))) (command "_.pedit" "_m" ss "" "_j" "" "_w" 0. "") ) (princ) ) Quote Link to comment Share on other sites More sharing options...
ceseme Posted November 16, 2011 Author Share Posted November 16, 2011 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! Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 16, 2011 Share Posted November 16, 2011 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]: Quote Link to comment Share on other sites More sharing options...
ceseme Posted November 16, 2011 Author Share Posted November 16, 2011 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. Quote Link to comment Share on other sites More sharing options...
alanjt Posted November 16, 2011 Share Posted November 16, 2011 Fillet them. Post an example drawing. Quote Link to comment Share on other sites More sharing options...
ceseme Posted November 16, 2011 Author Share Posted November 16, 2011 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. Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted November 16, 2011 Share Posted November 16, 2011 That must be one bad-ass drawing that won't let you fillet, join or glue lines together! Quote Link to comment Share on other sites More sharing options...
ceseme Posted November 16, 2011 Author Share Posted November 16, 2011 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. Quote Link to comment Share on other sites More sharing options...
LibertyOne Posted November 17, 2011 Share Posted November 17, 2011 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? Quote Link to comment Share on other sites More sharing options...
SLW210 Posted November 17, 2011 Share Posted November 17, 2011 I had NO problem using _PEDIT>M, _MPEDIT or _FILLET = 0 to join the lines in your test drawing. Quote Link to comment Share on other sites More sharing options...
Least Posted November 17, 2011 Share Posted November 17, 2011 dear me, you need to start spending a bit more money on your surveys! looks like what you get when you scan a paper drawing into cad. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.