我认为你在寻找:
- (defun c:AtoT( / theAttributeEntity AttributeList TextList )
- (if (not (setq theAttributeEntity (car (entsel "\nSelect attribute to convert to text: ")))) (exit))
- (setq AttributeList (entget theAttributeEntity)
- TextList (list '(0 . "TEXT")
- '(100 . "AcDbEntity")
- '(100 . "AcDbText")))
- (foreach DXFCode '(7 8 10 11 40 41 50 51 67 71 72 210 410)
- (setq TextList (append TextList (list (assoc DXFCode AttributeList))))
- )
- (setq TextList (append TextList
- (list (cons '1 (cdr (assoc 2 AttributeList))))
- (list (cons '73 (cdr (assoc 74 AttributeList))))))
- (entdel theAttributeEntity)
- (entmake TextList)
- (princ)
- )
当做 |