Zorg Posted May 6, 2009 Posted May 6, 2009 Anyone have a simple code so that i can just type 'PJ' and select 2+ polylines and change them into one polyline. I find that i can't always just Fillet them to join. Thanks in advance :wink: Zorg Quote
Zorg Posted May 6, 2009 Author Posted May 6, 2009 It does, but to repeat that 100 times is kinda fustrating. Quote
Zorg Posted May 6, 2009 Author Posted May 6, 2009 didn't know you could do 'multiple' does this work on arcs ect too? Quote
Lee Mac Posted May 6, 2009 Posted May 6, 2009 If you really need it: (defun c:pj () (setvar "PEDITACCEPT" 1) (command "_.pedit" "_M" (ssget) "" "_J" "" "") (princ)) EDIT: Yes, will work on Arcs too Quote
Zorg Posted May 6, 2009 Author Posted May 6, 2009 Blah! Can't test it out until tomorrow. Need admins password to modify AutoCAD directoy. Needed to know - does this take into account the 'FuzzFactor'? (Fill in the Gaps between polylines) Z Quote
Lee Mac Posted May 6, 2009 Posted May 6, 2009 Just curious, why do you need to alter the AutoCAD directory? Can't you just save it in a folder you can access and load it? As for Fuzz Factor, it just sets it to 0.00 (just uses default) Quote
Zorg Posted May 7, 2009 Author Posted May 7, 2009 Doesn't that mean i'll have to do an AppLoad everytime i bootup AutoCAD? It doesn't fill in the gaps between polylines, is that to do with the Fuzz Factor? :S Z Quote
Lee Mac Posted May 7, 2009 Posted May 7, 2009 Doesn't that mean i'll have to do an AppLoad everytime i bootup AutoCAD? Not necessary. It will load more reliably in the ACADDOC.lsp (but that would mean altering the directory - unless you change the search path), but alternatively, just add the LISP to the start-up suite. It doesn't fill in the gaps between polylines, is that to do with the Fuzz Factor? :S Yes, with the Fuzz factor at zero, the lines will only join if touching. Quote
Zorg Posted May 7, 2009 Author Posted May 7, 2009 Is the Fuzz factor a threshold or can you write a lisp so that when i enter PJ and click either line it determines the Fuzz factor and joins the polylines? Z Quote
Zorg Posted May 7, 2009 Author Posted May 7, 2009 I'm learning fast ^^ (defun c:PJ(/ l1 l2 fz) (setvar "PEDITACCEPT" 1) (if (and (setq l1(entsel "\nSelect first line > ")) (setq l2(entsel "\nSelect second line > ")) (setq fz(distance(cadr l1)(cadr l2))) (vl-cmdf "_.pedit" "_m" (car l1)(car l2) "" "_j" "_j" "_a" fz "") ); end and (c:jln) ); end if (princ) ); end c:PJ Quote
Lee Mac Posted May 7, 2009 Posted May 7, 2009 Nice one, just remember to post code in [ code] [/code] tags (without spaces) - makes it easier to read Quote
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.