muksun 发表于 2009-5-30 23:27:00

【求助】请问下面这段代码是什么意思?怎么实现呢?

<table cellspacing="2" cellpadding="2" width="98%" align="center" border="0" style="TABLE-LAYOUT: fixed; WORD-BREAK: break-all;"><tbody><tr><td align="center" height="32" style="FONT-SIZE: 12pt; COLOR: #ff6600;">xl:PutXData&nbsp;把扩展数据附着到ACAD图元上</td></tr><tr><td align="center" bgcolor="#f7f7f7" height="25"></td></tr><script language="javascript"></script><tr><td><p align="right">&nbsp;</p><div class="ContentFont" id="NewaspContentLabel" style="PADDING-RIGHT: 10px; DISPLAY: block; PADDING-LEFT: 10px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px;"><font id="font_word" style="FONT-SIZE: 14px; FONT-FAMILY: 宋体, Verdana, Arial, Helvetica, sans-serif;"><p><font face="Times New Roman">;;功能&nbsp; <br/>;;把扩展数据附着到ACAD图元上,对于图元上已经有的相同注册程序名的XDATA数据会覆盖<br/>;;语法&nbsp; <br/>;;(ax:PUTXData Obj DATA)&nbsp; <br/>;;参数&nbsp; <br/>;;obj:图元名<br/>;;XDATA:扩展数据<br/>;;如:&nbsp; (("south" (1000 . "204201") (1040 . 1.0))<br/>;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ("AAAA" (1041 . 562.307)&nbsp; (1000 . "aaaaa"))<br/>;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ("BBBB" (1000 . "bbbbbbb"))<br/>;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ("CCCC" (1041 . 752.569))<br/>;;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<br/>;;样例&nbsp; <br/>;;(xl:putXData myVlaObj '(("south" (1000 . "204201") (1040 . 1.0))))<br/>(defun xl:PutXData (Obj Data / dxf n i data_i temp1 appid)<br/>&nbsp; (setq&nbsp;dxf&nbsp; (entget obj)<br/>&nbsp; &nbsp;N&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (LENgth data)<br/>&nbsp;i&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0<br/>&nbsp;data_i '(-3)<br/>&nbsp; )<br/>&nbsp; (repeat n<br/>&nbsp;&nbsp;&nbsp; (setq temp1&nbsp; (nth i data)<br/>&nbsp;&nbsp; appid (car temp1)<br/>&nbsp;&nbsp; data_i (append data_i (list temp1))<br/>&nbsp;&nbsp; i&nbsp; (1+ i)<br/>&nbsp;&nbsp;&nbsp; )<br/>&nbsp;&nbsp;&nbsp; (regapp appid)<br/>&nbsp;&nbsp;&nbsp; (entmod (append dxf (list data_i)))<br/>&nbsp; )</font></p><p><font face="Times New Roman">)</font></p><div class="Message" id="Message"></div></font></div></td></tr></tbody></table>

tnt1095 发表于 2009-5-31 10:16:00

<p>如果没有说错的话,这段代码是南方测绘有限公司的Cass系列中的一段给地形图中的实体添加属性的代码(该软件的思想是将地物代码等信息添加到Xdata中,避免使用任何数据库)</p>
页: [1]
查看完整版本: 【求助】请问下面这段代码是什么意思?怎么实现呢?