请大佬帮忙看下是哪里有问题
(defun c:A12 ()(if (not (tblsearch "layer" "DIM"))
(command "layer" "m" "DIM" "c" "3" "" "")
)
(setq ss (ssget))
(if ss
(progn
(setq allents (ssget "x"))
(setq ess (ES allents ss))
(command "change" ess "" "p" "la" "DIM" "")
)
)
(princ)
)
选择对象后提示错误: no function definition: ES
(setq ess (ES allents ss)),没有ES这个函数 sniper1111 发表于 2024-9-10 15:03
(setq ess (ES allents ss)),没有ES这个函数
谢谢,我再研究一下 这个程序的作用是什么的?是选择直线,标注已起终点标注长度???
看代码前面创建了图层DIM,选择对象,然后通过ES函数处理之后,改处理出来的对象的图层到DIM。
关键是ES函数是什么了 判断没有选中的对象放入DIM,ES拼凑代码的时候不对
(defun c:tt ()
(if (not (tblsearch "layer" "DIM"))
(command "-layer" "m" "DIM" "c" "3" "" "")
)
(if (setq ss (ssget))
(progn
(setq ssx (ssget "x"))
(command "select" ssx "r" ss "")
(setq ss1 (ssget "p"))
(command "chprop" ss1 "" "la" "DIM" "")
)
)
(princ)
)
页:
[1]