Jump to content

Looking for the Join polyline lisp that is in this forum!!!


PREID

Recommended Posts

Hey Everyone!

 

I am looking for the join polyline lisp i found in the lisp forum i lost all of my commands and this one became part of my routine i have looked for hours unsuccessfully. Any help locating this would be greatly appreciated!

 

 

Thanks

Link to comment
Share on other sites

I don't know if you are referring to the "Silent PEDIT" Thread from the Autodesk forums... There are some great ones on that one thread alone.

http://forums.autodesk.com/t5/Visual-LISP-AutoLISP-and-General/Silent-Pedit/td-p/2048261/page/2

Here's is my favorite from there. You select one object, and whatever is in touching "end-to-end" with the object gets turned into a polyline.

;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)
 (princ)
)

Link to comment
Share on other sites

Another, to join all in a selection:

 

(defun c:pj ( / pe ss )
 (setq pe (getvar 'PEDITACCEPT))
 (setvar 'PEDITACCEPT 1)
 (if (setq ss (ssget "_:L" '((0 . "ARC,LINE,LWPOLYLINE"))))
   (command "_.pedit" "_M" ss "" "_J" "" "")
 )
 (setvar 'PEDITACCEPT pe)
 (princ)
)

Link to comment
Share on other sites

  • 3 years later...
  • 2 years later...

Hello,

 

I am new to this forum and somewhat new to AutoLisp. I am having trouble joining the two arcs created in the following lisp. I would like for the lisp to join these arc automatically without user selection. Any and all assistance would be tremendously appreciated!!! I've been racking my brain for 2 days now!

 

(defun c:Head()

(command-s "cmdecho" "0")

(command "osmode" "0")

(command "3dosmode" "0")

(command "attdia" "0")

(command "delobj" "1")

(command-s "-layer" "unlock" "*" "")

(command-s "-layer" "set" "0" "")

(command-s "erase" "all" "")

(command-s "-layer" "delete" "*" "")

(command-s "grid" "off")

(command-s "-color" "253")

(command-s "vscurrent" "e" "")

(command-s "-vpoint" "1,-1,1")

 

(command-s "_.arc" "66.24,134.684270796556" "c" "0,6.82394700531876" "a" "27.3871075026539")

(command-s "_.arc" "72,124.707658144959" "c" "60.48,124.707658144959" "a" "60")

 

'I NEED A COMMAND HERE TO JOIN THE TWO ARCS JUST CREATED...

 

(command "osmode" "183")(command "orthomode" "0")(princ))

Link to comment
Share on other sites

Here try this and next time post your code in code tags : [noparse]

Your code here...

[/noparse]

 

(defun c:Head ( / arc1 arc2 pea )
 (setvar 'cmdecho 0)
 (setvar 'osmode 0)
 (if '3dosmode
   (setvar '3dosmode 0)
 )
 (setvar 'attdia 0)
 (setvar 'delobj 1)
 (command "_.-layer" "unlock" "*" "")
 (command "_.-layer" "set" "0" "")
 (command "_.erase" "all" "")
 (command "_.-layer" "delete" "*" "")
 (setvar 'gridmode 0)
 (setvar 'cecolor "253")
 (command "_.vscurrent" "e")
 (command "_.vpoint" "1,-1,1")
 (command "_.arc" "66.24,134.684270796556" "c" "0,6.82394700531876" "a" "27.3871075026539")
 (setq arc1 (entlast))
 (command "_.arc" "72,124.707658144959" "c" "60.48,124.707658144959" "a" "60")
 (setq arc2 (entlast))
 (setq pea (getvar 'peditaccept))
 (setvar 'peditaccept 1)
 (command "_.pedit" "m" arc1 arc2 "" "j")
 (while (< 0 (getvar 'cmdactive))
   (command "")
 )
 (setvar 'peditaccept pea)
 (command "_.zoom" "e")
 (setvar 'osmode 183)
 (setvar 'orthomode 0)
 (princ)
)

 

Regards, M.R.

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