kingerst 发表于 2009-7-1 15:37:00

高手救救我!

<p>下面的程序已可以帮我把块中自定义的属性 值显示出来,问题是如何把它循环出来的值 逐一附给变量? </p><p>我主要是要实现,在DCL框里可以显示,修改值,望高手指点。。。</p><p></p><p>;显示图块属性<br/>(DEFUN C:PRTATTRIB ()<br/>&nbsp; ;(SETVAR "CMDECHO" 1)<br/>&nbsp; (IF (AND (PRINC "<a href="file://\\nSelect">\\nSelect</a> Block with attribute 选择带属性图块 :")<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (SETQ SS (SSGET '((0 . "INSERT") (66 . 1))))) <br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br/>&nbsp; (PROGN<br/>&nbsp;&nbsp; (SETQ I -1)<br/>&nbsp;&nbsp; (REPEAT (SSLENGTH SS)<br/>&nbsp;&nbsp;&nbsp; (SETQ ENT (ENTGET (SSNAME SS (SETQ I (1+ I))))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENT1 ENT)<br/>&nbsp;&nbsp;&nbsp; (WHILE (= (CDR (ASSOC 0 (SETQ ENT1 (ENTGET (ENTNEXT (CDR (ASSOC -1 ENT1))))))) "ATTRIB")<br/>&nbsp;&nbsp;&nbsp;&nbsp; (WRITE-LINE (CDR (ASSOC 1 ENT1)))<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp; (PRINC "<a href="file://\\n">\\n</a>")<br/>&nbsp;&nbsp; )<br/>&nbsp; ))<br/>&nbsp; ;(SETVAR "CMDECHO" 1)<br/>&nbsp; (PRINC)<br/>)<br/></p>
页: [1]
查看完整版本: 高手救救我!