还是好人多呀,我一直用土办法,看来可以换换了
下来看看是不是真的那么快。
顶,,好用
,不错
旧代码,可能重复发了:)参考一下吧:)
(defun c:ee (/)
(if (setq Ename(entsel "\n有请选取一条要连接的线:"))
(PROGN
(if(=(cdr(assoc 0(ENTGET(CAR Ename))))"LWPOLYLINE")
(command "pedit" Ename "J" "all" "" "")
(command "pedit" Ename "" "J" "all" "" "")
)
)
)
(princ)
)
試試這個.
;點選任一物件,自動串接首尾相連的線條成聚合線,只能連接當前螢幕能看得全的物件
(Defun C:J (/ Ss Pt1 Pt2)
(Setvar "Cmdecho" 0)
(Setq Pt1 (Getvar "Vsmin"));視埠虛擬螢幕的左下角點
(Setq Pt2 (Getvar "Vsmax"));視埠虛擬螢幕的右上角點
(Setq Ss (Entsel "\n 選取物件:"))
(Vl-Cmdf ".Pedit" Ss "Yes" "J" "C" Pt1 Pt2 "" "")
(Setvar "Cmdecho" 1)
(Princ)
)
这个如何:
(defun c:ppp( / pet ss)
(setq pet (getvar "PEDITACCEPT"))
(setvar "PEDITACCEPT" 1)
(while (setq ss (ssget '((0 . "ARC,*LINE"))))
(command "_pedit" (ssname ss 0) "j" ss "" "")
)
(setvar "PEDITACCEPT" pet)
(princ)
)
谢谢诸位了!
很好,实用.简洁