[求助]修改旋转文字角度源码
<p><font face="Verdana">(defun c:test1( / ent ents ang)<br/> (setq ent (car (nentsel)))<br/> (setq ents (entget ent))<br/> (setq ang (getangle "\n输入角度:"))<br/> (setq ents (subst (cons 50 ang) (assoc 50 ents) ents))<br/> (entmod ents)<br/> (entupd ent)<br/> (princ)<br/>) <br/></font></p><p><font size="6">怎样将上面这段源码中的点选改为框选?</font></p> <p><font face="Verdana">(defun c:test1 (/ ent ents ang)<br/> (princ "选择要修改的文字,可多选")<br/> (setq ss (ssget '((0 . "*TEXT"))))<br/> (setq ang (getangle "\n输入角度:"))<br/> (setq k 0)<br/> (repeat (sslength ss)<br/> (progn<br/> (setq ent (ssname ss k))<br/> (setq ents (entget ent))<br/> (setq ents (subst (cons 50 ang) (assoc 50 ents) ents))<br/> (entmod ents)<br/> (entupd ent)<br/> (setq k (1+ k))<br/> )<br/> )<br/> (princ)<br/>)</font></p>
<p><font face="Verdana"><br/></font> </p> 2楼威武霸气,这么短的代码实现了 (defun c:tt ()
(setq ang(Uangle 1 "" "角度<输入或鼠标直接量取>" ang nil))
(princ "选择要修改的文字: ")
(if (setq ss (ssget '((0 . "*TEXT"))))
(xyp-SubUpd ss 50 ang)
)
(princ)
)
页:
[1]