马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
x
Converting object data to xdata using AutoLISP
问题:
Can I use AutoLISP to export object data to XData so that it can be easily read
in a DXF file?
解答:
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:
游客,本帖隐藏的内容需要积分高于 30 才可浏览,您当前积分为 0
|