你想要完整的代码?还是只要思路
仅供参考
(defun c:tt()
(setq ss0 nil ent0 nil)
(setq yunxing T)
(setq ss0
(ssget
'(
(0 . "line")
)
)
)
(while yunxing
(while (= nil ent0)
(setq ent0
(car
(entsel "\n选择要剔除的一根线:")
)
)
(setq ent0 (ssmemb ent0 ss0))
)
(setq ss0 (ssdel ent0 ss0))
(setq ent0 nil)
(setq i (sslength ss0) n 0)
(repeat i
(setq ent1 (ssname ss0 n))
(setq ent1 (entget ent1))
(setq xyz1 (cdr (assoc 10 ent1)))
(setq x1 (car xyz1) y1 (cadr xyz1) z1 (caddr xyz1))
(setq ent1 (subst
(cons 10 (list x1 y1 (+ 550 z1)))
(assoc 10 ent1)
ent1)
)
(setq xyz2 (cdr (assoc 11 ent1)))
(setq x2 (car xyz2) y2 (cadr xyz2) z2 (caddr xyz2))
(setq ent1 (subst
(cons 11 (list x2 y2 (+ 550 z2)))
(assoc 11 ent1)
ent1)
)
(entmod ent1)
(setq n (1+ n))
)
(grread)
)
)
温馨提示:内容为网友见解,仅供参考