- (defun c:cc()
- (setq ss(ssadd))
- (prompt "\n选择处理直线对象:")
- (setq ss1(ssget '((0 . "line"))))
- (setq i (1- (sslength ss1)))
- (while (>= i 0)
- (setq ll(ssname ss1 i))
- (setq p10(cdr (assoc 10 (entget ll)))
- p11(cdr (assoc 11 (entget ll))))
- (setq tmp_ss(ssget "x" (list '(0 . "line")(cons 10 p10) (cons 11 p11))))
- (if (> (sslength tmp_ss) 1)
- (progn
- (setq j 0)
- (repeat (sslength tmp_ss)
- (setq ss(ssadd (ssname tmp_ss j) ss)
- ss1(ssdel (ssname tmp_ss j) ss1))
- (setq j(1+ j))
- )
- )
- (setq ss1(ssdel (ssname tmp_ss 0) ss1))
- )
- (setq i (1- (sslength ss1)))
- )
- (sssetfirst nil ss)
- )
|