motee-z 发表于 2022-7-6 12:29:01

将属性更改为文本

任何人都可以帮助编写lisp来拾取属性并将其更改为具有相同值的文本
谢谢

asos2000 发表于 2022-7-6 12:43:30

在快捷菜单中
Express>Blocks>将块分解为文本。
命令:突发

ReMark 发表于 2022-7-6 13:04:27

我认为Burst命令的正确定义是,它将属性分解为文本,而不是块。我完全同意这似乎是最符合逻辑的方法。
 
你使用的是什么版本的AutoCAD?

motee-z 发表于 2022-7-6 13:10:28

当属性附加到块时,突发命令处于活动状态,但当属性未附加到块时,我的意思是,该命令也从express tools变为非活动状态,我使用autocad 2008
谢谢

MSasu 发表于 2022-7-6 13:21:58

我认为你在寻找:
 
(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 2AttributeList))))
                     (list (cons '73 (cdr (assoc 74 AttributeList))))))
(entdel theAttributeEntity)
(entmake TextList)
(princ)
)
 
当做

motee-z 发表于 2022-7-6 13:31:32

真的谢谢
页: [1]
查看完整版本: 将属性更改为文本