各位大神帮忙看一下到底哪里出问题了
(defun c:zd()(setq ss(ssget'((0 . "mtext,LWPOLYLINE"))))
(if ss
(repeat (setq i (sslength ss))
(setq s1(entget(ssname ss (setq i (1- i)))))
(setq ent(entget(ssname ss 0)))
(entmod(subst(cons 70 1)(assoc 70 s1) s1))));;线框该闭合
(setq s2(assoc 1 s1))
(setq nn(cdr s2))
(setq dd(read(cdr(assoc 1 (entget(ssname ss 0))))
(cond ;过滤选择项
((= dd "x)
(setq str nn)
(while (vl-string-search"\\p" str);替换字符
(setq str(vl-string-subst "\n" "\\P" str))
(entmod(subst(cons 1 str)(assoc 1 s1) s1))
(t nil)
(command"wipeout" "P" ss "" "Y" "");批量WIPOUT
(command"draworder" ss "" "F" "" );批量DRAWODER
(princ)))
初学,见笑了。想要实现的功能无非是将图中红色坐标值的换行符批量去掉,然后将矩形框改成封闭然后批量WIPOUT,批量DRAWORDER.最后的效果是矩形框可以遮蔽下面的图线,而框内的坐标可以显示(而不是被遮蔽圈遮住)
什么意思的呀?没有弄懂的?
页:
[1]