- 积分
- 347
- 明经币
- 个
- 注册时间
- 2003-8-5
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-3-1 23:07:00
|
显示全部楼层
Xrecord
Xrecord objects are used to store and manage arbitrary data. They are composed of DXF group codes with "normal object" groups (that is, non-xdata group codes), ranging from 1 through 369 for supported ranges. This object is similar in concept to xdata but is not limited by size or order. Xrecord objects are designed to work in such a way as to not offend releases R13c0 through R13c3. However, if read into a pre-R13c4 level of AutoCAD, xrecord objects disappear. The following examples provide methods for creating and listing xrecord data.
(defun C:MAKEXRECORD( / xrec xname ) ; create the xrecord's data list (setq xrec '((0 . "XRECORD")(100 . "AcDbXrecord") (1 . "This is a test xrecord list") (10 1.0 2.0 0.0) (40 . 3.14159) (50 . 3.14159) (62 . 1) (70 . 180)) ) ; use entmakex to create the xrecord with no owner (setq xname (entmakex xrec)) ; add the new xrecord to the named object dictionary (dictadd (namedobjdict) "XRECLIST" xname) (princ) )
(defun CISTXRECORD ( / xlist ) ; find the xrecord in the named object dictionary (setq xlist (dictsearch (namedobjdict) "XRECLIST")) ; print out the xrecord's data list (princ xlist) (princ)
) |
|