我想attrib & attdef基本資料與text/mtext是一樣的
(defun C:TT (/ ENT ENT1 ENT2 ENT3)
(setq ENT (entget (car (nentsel)))) ;;entsel→nentsel
(print ENT)
(setq ENT1 (entget (cdr (assoc 360 ENT))))
(print ENT1)
(setq ENT2 (entget (cdr (assoc 360 ENT1))))
(print ENT2)
(setq ENT3 (entget (cdr (assoc 360 ENT2))))
(print ENT3)
(mapcar '(lambda (X)
(if (= (car X) 360)
(print (entget (cdr X)))
)
)
ENT3
)
(princ)
)
從ent3中有
(2 . "%<\\_FldIdx 0>%liec%<\\_FldIdx 1>%")
(90 . 2)
(360 . <ENTITY NAME: 7EF75490>)
(360 . <ENTITY NAME: 7EF75498>)
--------------------------------------------
(360 . <ENTITY NAME: 7EF75490>)
有 (2 . "\\AcVar acadver")
---------------------------------------
(360 . <ENTITY NAME: 7EF75498>)
有 (2 . "\\Acvar CreateDate \\f \"dddd, MMMM dd, yyyy\"")
---------------------------------------------
把下列3句處理下即可求出fieldcode
(2 . "%<\\_FldIdx 0>%liec%<\\_FldIdx 1>%")
(2 . "\\AcVar acadver")
(2 . "\\Acvar CreateDate \\f \"dddd, MMMM dd, yyyy\"")
本來已寫好,但忘了帶來公司
Field的背景不显示?
還沒有辦法,看來是不行了
|