Jump to content

Recommended Posts

Posted

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

Posted

It does, but to repeat that 100 times is kinda fustrating.

Posted

didn't know you could do 'multiple'

does this work on arcs ect too?

Posted

If you really need it:

 

(defun c:pj ()
 (setvar "PEDITACCEPT" 1)
 (command "_.pedit" "_M" (ssget) "" "_J" "" "")
 (princ))

 

EDIT: Yes, will work on Arcs too

Posted

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

Posted

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)

Posted

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

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

Posted

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

Posted

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

Posted

Nice one, just remember to post code in [ code] [/code] tags (without spaces) - makes it easier to read :)

Posted

nps! cheers for the heads up

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