![]() |
【转帖】[求助]在arx中如何读出lisp写的扩展数据
[求助]在arx中如何读出lisp写的扩展数据
[求助]在arx中如何读出lisp写的扩展数据 在arx中如何读出lisp写的扩展数据 有一以前的系统是lisp写的 在以前的系统中生成有如下的扩展数据,我现在的代码是arx写的,要兼容以前的数据,就用读取这样扩展数据,在arx中能不能读出这些数据,如何读出。或者有没有其他方法,只要能读出这些数据,让我在arx代码中用就可以。 我一直用arx开发,lisp基本不懂 (-3 ("控规:街坊" (1002 . "{") (1000 . "apa-01") (1000 . "居住") (1000 . " 搞规划的吧,你lisp不懂就会arx,比俺强多了,用autocad map,直接转到rdb里,还编什么程啊 承接软件项目工程。 email:haill 我是用c语言写的程序. struct resbuf *rb2,*rb1; rb1=ads_buildlist(rtstr,"apa-01",0); rb2=ads_entgetx(ent,rb1); assoc_dxf_str(rb1,1000,stemp); ... ... 上边assoc-dxf_str函是检索数据链表的.详细如下 ------ 缓冲链表操作函数 5.链表检索(字符型) -------------- */ int assoc_dxf_str(struct resbuf *rb,int dxf_code,char *result) { struct resbuf *rb1; if (dxf_type(dxf_code)!=rtstr) return rterror; if (rb==null) return rterror; for (rb1=rb;rb1!=null;rb1=rb1->rbnext) { if (rb1->restype==dxf_code) { strcpy(result,rb1->resval.rstring); return rtnorm; } } return rterror; } /***************************************************************************/ ------ 缓冲链表操作函数 1.节点类型 */ int dxf_type(int dxf_code) { if (dxf_code>=1000) dxf_code=dxf_code-1000; if (dxf_code<0) return dxf_code; if (dxf_code>=0 && dxf_code<=9) return rtstr; if (dxf_code>=10 && dxf_code<=19) return rtpoint; if (dxf_code>=38 && dxf_code<=59) return rtreal; if (dxf_code>=60 && dxf_code<=79) return rtshort; if (dxf_code>=210 && dxf_code<=239) return rt3dpoint; return rtnone; } |
| 所有的时间均为北京时间。 现在的时间是 02:13 AM. |