XDSoft 发表于 2021-2-4 14:15:00

转换对象数据到扩展实体数据

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:
**** Hidden Message *****

杨天龙 发表于 2021-2-4 22:47:32

666666666666

yoyoho 发表于 2021-2-5 07:39:14

缺(ade_开头函数

liulisheng 发表于 2021-2-6 19:24:00

必须支持楼主一下

xk15c 发表于 2021-2-7 04:15:30

受教受教,涨姿势了

xvjiex 发表于 2021-2-15 06:50:39

转换对象数据到扩展实体数据,感谢分享!

janshyl 发表于 2021-3-22 08:28:43

很實用的教學 受教了

weizx2000 发表于 2021-4-5 00:09:20

谢谢分享谢谢分享

hxuerong1 发表于 2021-5-9 17:25:46


666666666666

sooma78 发表于 2022-5-26 20:24:28

这个想法很好

ilovem 发表于 2023-4-24 10:21:38

谢谢楼主的分享
页: [1]
查看完整版本: 转换对象数据到扩展实体数据