用AutoLISP转换对象数据到扩展数据
Converting object data to xdata using AutoLISPQuestion
Can I use AutoLISP to export object data to XData so that it can be easily read
in a DXF file?
Answer
Yes. The following example is one implementation.It creates XData under
appname "MYODLIST" that is grouped by table, with records from that table nested
in that group. Note that because XData is limited to only 16KB, there is no
scope to handle overflow errors.
Here is sample XData that shows six records from three different tables that are
attached to this entity:
(-3 ("MYODLIST"
(1002 . "{")
(1000 . "test1")
(1002 . "{") (1070 . 0) (1000 . "num=1.0000") (1000 . "ordinal=First")
(1002 . "}")
(1002 . "}")
(1002 . "{")
(1000 . "test2")
(1002 . "{") (1070 . 0) (1000 . "num2=1.0000") (1000 . "ordinal=First")
(1002 . "}")
(1002 . "{") (1070 . 1) (1000 . "num2=2.0000") (1000 . "ordinal=Second")
(1002 . "}")
(1002 . "}")
(1002 . "{")
(1000 . "test3")
(1002 . "{") (1070 . 0) (1000 . "num3=1.0000") (1000 . "ordinal=First")
(1002 . "}")
(1002 . "{") (1070 . 1) (1000 . "num3=2.0000") (1000 . "ordinal=Second")
(1002 . "}")
(1002 . "{") (1070 . 2) (1000 . "num3=3.0000") (1000 . "ordinal=Third")
(1002 . "}")
(1002 . "}"))))
Here is the code:
**** Hidden Message *****
向N版学习'天天向上 学习园地,好
很好,很多东西学 向N版学习ing... 学习 感谢分享,学习中。
学习....... 学习。。。。。 感谢分享,学习中!!!!! 感谢分享,学习中!!!!! 学习学习,谢谢
怎么还是全英文的呀!!!1 学习学习,一直用ldata
向N版学习'天天向上