autolisp xrecord学习资料
用 Google 搜索 GetXRecordData,很多现成代码的 (defun dict-get (owner name / d) (cond ((not owner) (dict-get (namedobjdict) name)) ((= (type owner) 'str) (dict-get (dict-get (namedobjdict) owner) name)) ((= (type owner) 'ename) (dict-get (entget owner) name)) ((not (listp owner)) nil) ((eq (cdr (assoc 0 owner)) "DICTIONARY") (cond ((dictsearch (cdar owner) name)) ((and (setq d (entmakex '((0 . "DICTIONARY") (100 . "AcDbDictionary")))) (dictadd (cdar owner) name d)) (entget d)))) ((setq d (assoc 360 owner)) (dict-get (cdr d) name)) ((and (setq d (entmakex '((0 . "DICTIONARY") (100 . "AcDbDictionary")))) (entmod (append owner (list '(102 . "{ACAD_XDICTIONARY") (cons 360 d) '(102 . "}"))))) (dict-get d name)))) owner) name d)) (entget d)))) ((setq d (assoc 360 owner)) (dict-get (cdr d) name)) ((and (setq d (entmakex '((0 . "DICTIONARY") (100 . "AcDbDictionary")))) (entmod (append owner (list '(102 . "{ACAD_XDICTIONARY") (cons 360 d) '(102 . "}"))))) (dict-get d name))))
用户评论