把(defun c:q3(/ *error* ent gr i msg n qf ss s1)改成(defun c:q3(/ ent gr i msg n qf s1)试试。
还是不行吖!!!
需要点或选项关键字。
; 错误: *error* 函数中出错AutoCAD 变量设置被拒绝: "qaflags" nil
指定修改点或 [特性(P)]: 终于,这样可以了
(defun c:1()
(setq ss (ssget"i"))
(if (= ss nil)(1,)(1,,)))
(defun 1,()
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" ""))
(defun 1,,()
(setq ss (ssget))
(setq la (getvar"clayer"))
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" "" "clayer" la)
(command "change" ss "" "P" "la" "0" "c" "byl" "lw" "byl" "lt" "byl" "")) 本帖最后由 布朗运动 于 2016-1-15 18:15 编辑
669423907 发表于 2013-5-6 20:06 static/image/common/back.gif
终于,这样可以了
(defun c:1()
(defun c:1()
(setvar "cmdecho" 0) ;增加这个试试看
(setq ss (ssget"i"))
(if (= ss nil)
(command "layer" "m" "0" "c" "253" "" "lw" "0.3" "" "")
(command "change" ss "" "p" "la" "0" "c" "byl" "lw" "byl" "lt" "byl" "")))
参见:http://bbs.mjtd.com/forum.php?mod=viewthread&tid=95050,xyz2009xyz的回答。
页:
1
[2]