[求助]请问高手,如何列出所有标注样式名称?
请问高手,如何列出所有标注样式名称? 要是能给这个 完善了不是更美好嘛!!!! 本帖最后由 作者 于 2007-11-3 12:02:00 编辑 <br /><br /> (defun test (/ ce lst)<br/> (while (setq ce (tblnext "Dimstyle" (not ce)))<br/> (setq lst (append lst (list (cdr (assoc 2 ce)))))<br/> )<br/> (acad_strlsort lst)<br/>) 谢谢楼上,但我还想问个问题,如何把列表lst中全局比例(getvar "DIMSCALE")相同的标注样式,合并成(strcat "模型空间1:" (vl-princ-to-string (getvar "DIMSCALE")))?? 不懂楼主的意思 <p>我的意思是:</p><p>例如:图中有标注样式“50”“100”“150”“200”“250”,其中“50”“150”“250”的全局比例"DIMSCALE"都是100,需要把“50”“150”“250”合并成样式:“模型空间1:100”。</p><p>不知这样说明白了没有?</p> 本帖最后由 作者 于 2007-11-3 16:56:04 编辑 <br /><br /> <p>(mapcar '(lambda (x / app)<br/> (if (= (cdr (assoc 40 (entget (tblobjname "dimstyle"<br/> (cdr (assoc 3 (setq app (entget x))))<br/> )<br/> )<br/> )<br/> )<br/> <font color="#0000ff"> 100<br/></font> )<br/> (entmod (subst '(3 . "<font color="#ff0000">模型空间1:100</font>") (assoc 3 app) app))<br/> )<br/> )<br/> lst<br/>)</p><p>注意要确保标注样式<font color="#000000">模型空间1:100存在, lst是图元列表</font></p><p>--------------------------------------------------------------------------------------</p><p></p><p></p><p></p><p></p> <p>楼上,按您的要求:标注样式<font color="#000000">模型空间1:100存在, lst是图元列表</font></p><p>但是执行后:</p><p>错误: 参数类型错误: lentityp "标注1:100"(其中的一个标注样式)</p> <strong><font face="Verdana" color="#61b713">caoyin兄,可否帮忙看看是什么原因?</font></strong> <p>我测试没有问题啊,</p><p>程序执行条件:标注样式 "标注1:100" 存在。</p><p>测试文件: </p> 谢谢,高人<strong><font face="Verdana" color="#61b713">caoyin</font></strong>
页:
[1]
2