newer 发表于 2014-12-20 12:34:43

用AutoLISP转换对象数据到扩展数据

Converting object data to xdata using AutoLISP

Question
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 *****

/db_自贡黄明儒_ 发表于 2014-12-20 12:54:27

向N版学习'天天向上

wzg356 发表于 2014-12-20 12:54:55

学习园地,好

819534890 发表于 2014-12-20 13:44:10

很好,很多东西学

HLCAD 发表于 2014-12-20 14:01:19

向N版学习ing...

sicky111 发表于 2014-12-25 18:02:47

学习                  

e2002 发表于 2014-12-31 21:45:44

感谢分享,学习中。

q3_2006 发表于 2015-1-2 06:18:21


学习.......

qyming1996 发表于 2015-1-2 10:06:04

学习。。。。。

yoyoho 发表于 2016-1-15 14:43:21

感谢分享,学习中!!!!!

yoyoho 发表于 2016-1-15 14:45:39

感谢分享,学习中!!!!!

lhtfhc 发表于 2016-1-15 14:50:50

学习学习,谢谢

wu112031853 发表于 2016-1-15 16:21:10

怎么还是全英文的呀!!!1

前生 发表于 2016-1-25 12:46:31

学习学习,一直用ldata

lucas3 发表于 2016-1-26 21:02:05


向N版学习'天天向上
页: [1] 2 3 4 5
查看完整版本: 用AutoLISP转换对象数据到扩展数据