对直线
Pedit -〉m -〉选择 -〉y -〉J -〉输入合并距离
或者
- (defun l2pl (l_name / s2 n e)
- (setq s2 (ssget (list '(-4 . "<AND")
- '(0 . "LINE,*POLYLINE,ARC")
- (cons 8 l_name)
- '(-4 . "<NOT")
- '(-4 . "<AND")
- '
- (0 . "*POLYLINE")
- '(70 . 1)
- '(-4 . "AND>")
- '
- (-4 . "NOT>")
- '(-4 . "AND>")
- )
- )
- )
- (if s2
- (progn
- (setq n (sslength s2))
- (setq i 0)
- (repeat n
- (if (setq e (ssname s2 i))
- (progn
- (if (wcmatch (cdr (assoc 0 (entget e))) "*POLYLINE")
- (command ".pedit" e "j" s2 "" "")
- (command ".pedit" e "y" "j" s2 "" "")
- )
- (if (= (cdr (assoc 70 (entget e))) 1)
- (progn
- (ssdel e s0)
- (setq n (1- n))
- )
- )
- )
- )
- (setq i (1+ i))
- )
- )
- )
- )
- (defun C:C_L2PL ()
- (prompt "\n请选择要连接成POLYLINE的LINE(线)和ARC(弧)<退出>:"
- )
- (l2pl "*")
- (princ)
- )
圆弧要编程了 |