兩個編輯多義線的程序
(defun c:j (/ join-ss rep1 len entnam enti)<BR> (setvar "CMDECHO" 0)<BR> (setq join-ss (ssget '((-4 . "<OR")<BR> (0 . "LINE")<BR> (0 . "ARC")<BR> (-4 . "<AND")<BR> (0 . "POLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "<AND")<BR> (0 . "LWPOLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "OR>")<BR> )<BR> )<BR> )<BR> (if (not join-ss)<BR> (exit)<BR> )<BR> (vl-cmdf "_.undo" "begin")<BR> (setq rep1 0)<BR> (setq len (sslength join-ss))<BR> (terpri)<BR> (repeat len<BR> (setq entnam (ssname join-ss rep1))<BR> (setq enti (entget entnam))<BR> (princ (strcat "\rProcessing line " (itoa (1+ rep1)) " of " (itoa len)))<BR> (if enti<BR> (if (or (= (cdr (assoc 0 enti)) "POLYLINE")<BR> (= (cdr (assoc 0 enti)) "LWPOLYLINE")<BR> )<BR> (command "_.pedit" entnam "j" join-ss "" "x")<BR> (command "_.pedit" entnam "y" "j" join-ss "" "x")<BR> )<BR> )<BR> (setq rep1 (1+ rep1))<BR> )<BR> (vl-cmdf "_.undo" "end")<BR> (setvar "CMDECHO" 1)<BR> (princ)<BR>)<BR>;;***************************<BR>(defun c:jj (/ join-ss rep1 len entnam enti)<BR> (setvar "CMDECHO" 0)<BR> (setq join-ss (ssget '((-4 . "<OR")<BR> (0 . "LINE")<BR> (0 . "ARC")<BR> (-4 . "<AND")<BR> (0 . "POLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "<AND")<BR> (0 . "LWPOLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "OR>")<BR> )<BR> )<BR> )<BR> (setq join-ss1 (ssget "x"<BR> '((-4 . "<OR")<BR> (0 . "LINE")<BR> (0 . "ARC")<BR> (-4 . "<AND")<BR> (0 . "POLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "<AND")<BR> (0 . "LWPOLYLINE")<BR> (70 . 0)<BR> (-4 . "AND>")<BR> (-4 . "OR>")<BR> )<BR> )<BR> )<BR> (vl-cmdf "_.undo" "begin")<BR> (if (not join-ss)<BR> (exit)<BR> )<BR> (setq rep1 0)<BR> (setq len (sslength join-ss))<BR> (terpri)<BR> (repeat len<BR> (if (setq entnam (ssname join-ss rep1))<BR> (progn<BR> (setq enti (entget entnam))<BR> (princ (strcat "\rProcessing line " (itoa (1+ rep1)) " of " (itoa len)))<BR> (if enti<BR> (if (or (= (cdr (assoc 0 enti)) "POLYLINE")<BR> (= (cdr (assoc 0 enti)) "LWPOLYLINE")<BR> )<BR> (command "_.pedit" entnam "j" join-ss1 "" "")<BR> (command "_.pedit" entnam "y" "j" join-ss1 "" "")<BR> )<BR> )<BR> )<BR> )<BR> (setq rep1 (1+ rep1))<BR> )<BR> (vl-cmdf "_.undo" "end")<BR> (setvar "CMDECHO" 1)<BR> (princ)<BR>) 感谢分享 感谢分享 怎么用呀不好使。
Processing line 1 of 1 顶顶顶顶顶顶 作用是什么??? 程序的效果是什么啊?
页:
[1]