哪位大佬帮忙看看为什么用不了
出现这个错误: 选择替换后的图块图元:; error: unsupported argument type((0 . "INSERT"))注:代码非本人原创,在其它地方下载的
entsel错误
(setq bl (entsel(list '(0 . "INSERT"))))修改为
(setq bl (entsel))
即可 ludaweb 发表于 2023-9-17 09:57
entsel错误
(setq bl (entsel(list '(0 . "INSERT"))))修改为
(setq bl (entsel))
谢谢大佬,66666666 (defun c:tt ()
"图块替换"
(defun SubUpd (ename code newvalue)(entmod (subst (cons code newvalue) (assoc code (entget ename)) (entget ename))) (entupd ename))
(princ "\n 选择需要替换的图块图元: ")
(if (and (setq ss (ssget '((0 . "INSERT"))))
(setq s0 (car (entsel "\n选择替换后的图块图块: ")))
(=(cdr(assoc 0 (entget s0))) "INSERT")
(setq bn (cdr (assoc 2 (entget s0))))
(setq i -1)
)
(while (setq s1 (ssname ss (setq i (1+ i))))
(SubUpd s1 2 bn)
)
)
(princ)
) xyp1964 发表于 2023-9-17 13:53
不要这个,这个没什么用,属性值不能复制过来
页:
[1]