当您“setq cl”时,会出现一个命令行响应,只需将其返回到1行,同时也本地化了cl变量。
- ^C^C^C(defun rectwade ( / CL) (if (= (getvar "tilemode") 1)
- (alert "This command does not work in model space.")
- (progn
- (setq CL (getvar "CLAYER"))
- (setvar 'clayer "VPORT")
- (command "rectang" pause pause "mview" "o" "l")
- (setvar "CLAYER" CL)
- )
- )
- )
- (rectwade)
- (princ)
|