I found this today and thought That I’d share it here because it is really cool.
If you need to make a POLYLINE of objects that continuously touch at their endpoints, this ones for you.
- EJA <enter> to start – (Entity Join All)
- Select one object in the chain – can be a Line, Arc or Polyline.
That’s it. The routine will check to see if the endpoints touch and if they do, it will join them for you.
The original post can be [found here] on the second page. It is also called PEJA.lsp
;Entity Join All
;Joins lines, arcs & Polylines at their endpoints automatically.
; All you have to do is select one object
; by Kent Cooper @ Autodesk forums
(defun C:EJA (/ peac cmde); = Polyline Edit: Join All
(setq peac (getvar ‘peditaccept))
(setvar ‘peditaccept 1)
(setq cmde (getvar ‘cmdecho))
(setvar ‘cmdecho 0)
(command“_.pedit” pause “_join”“_all”“”“”)
(setvar ‘peditaccept peac)
(setvar ‘cmdecho cmde)
Fantastic, a very quick and easy way to make polylines, congratulations
I’m happy that it is useful for you
Pingback: Auto Load Your Lisp Files (& others) | AutoCAD Tips
I am a complete AutoCAD rookie. My AutoCAD 2011 does not understand EJA . Any idea what I may be doing wrong?
Just a guess…
But since you said that you are a rookie, this command “EJA” is not a default AutoCAD command. It is a custom command that is made by copying the Code that is provided in the blog post. To copy the code and then load it into an AutoCAD session, refer to the following posts:
Updated & improved version [PolylineJoin.lsp] available at this thread:
where any further updates/enhancements/improvements will probably be posted, in case they don’t also show up here.
Good point Kent. For some routines that I have featured from a long time ago I did not include the link because I didn’t even think of the possibility or need to update the routines. I have since started to include the links as a commented section within the code. I will start to make an additional link within the post as well. I have wondered if should even include posting the code in my posts or simply having a direct link. Being that people are copying the code form here and then asking me to to update the code because of an issue I think that for now on I will leave out the code and give the link. That way you (the author) are aware of any issues.
Thanks for all that you do Kent
You’ve written a code that join them all. What if we want to joint some of them that we assigned names to them by setq entlast?
How can we do that? For example; I just want to join line7, arc1, line8, arc2 ?