(defun c:test( / ent ents i item item2 key m)<BR> (setq ent (nentsel)) <BR> (setq m (caddr ent))<BR> (setq ents (entget (car ent)))<BR> (setq i 0)<BR> (repeat (length ents)<BR> (setq item (nth i ents))<BR> (setq key (car item))<BR> (if (or (= key 10) (= key 11))<BR> (progn<BR> (setq item2 (chgcs (cdr item) m))<BR> (setq ents (subst (cons key item2) item ents))<BR> )<BR> )<BR> (setq i (1+ i))<BR> )<BR> (entmake ents)<BR>) 太感谢版主了,其他图元我自已试试,多谢! 这个程序只是拓宽一下你的思路,在极特殊的情况下会出错,如某一点转换后的坐标同下一点未转换的坐标相同,就会出错了。。。等等,一个完善的程序要考虑的问题是很多很多的,即使是一个简单的程序 以前也发过一个类是的
<A href="http://bbs.mjtd.com/forum.php?mod=viewthread&tid=8073" target="_blank" >http://bbs.mjtd.com/forum.php?mod=viewthread&tid=8073</A> 学到了学到了
页:
1
[2]