athome 发表于 2008-7-1 15:55:00

请教 AutoCAD 变量设置被拒绝: "bilpmode" 0

<p></p><p>下面的代码运行时出现错误提示:</p><p>&nbsp;错误: AutoCAD 变量设置被拒绝: "bilpmode" 0</p><p>如果把 (setvar "bilpmode" 0)注释上</p><p>运行以后出现 错误: AutoCAD 变量设置被拒绝: "blipmode" nil</p><p>请问是怎么回事?</p><p></p><p></p><p>(defun c:a4( / v1 v2 v3 ljmch cl shl bl)<br/>&nbsp;&nbsp; (setq v1(getvar "osmode"))<br/>&nbsp;&nbsp; (setq v2(getvar&nbsp; "cmdecho"))<br/>&nbsp;&nbsp; (setq v3(getvar "bilpmode"))<br/>&nbsp;&nbsp; (setvar "osmode" 0)<br/>&nbsp;&nbsp; (setvar "cmdecho" 0)<br/>&nbsp;&nbsp; (setvar "bilpmode" 0)<br/>&nbsp; (setq ljmch(getstring "\n输入零件名称:"))<br/>&nbsp; (setq cl(getstring "\n输入零件材料:"))<br/>&nbsp; (setq shl (getint "\n输入零件数量:"))<br/>&nbsp; (setq shl(itoa shl))<br/>&nbsp; (setq bl(getstring "\n输入绘图比例"))<br/>&nbsp; (command "style" "hz" "宋体" "" "" "" "" "" "" "")<br/>&nbsp; (command "layer" "m" "xixian" "c" "1" "" "" ) ;设置图纸边框线<br/>;;;&nbsp; (command "color" 5)<br/>&nbsp; (command "limits" "0,0" "210,297")<br/>&nbsp; (command "zoom" "a")<br/>&nbsp; (command "line" "0,0" "210,0" "210,297" "0,297" "c")<br/>&nbsp; (command "layer" "m" "cuxian" "c" "7" "" "lw" 0.6 "" "");设置图框<br/>&nbsp; (command "line" "25,5" "205,5" "205,292" "25,292" "c")<br/>&nbsp; (command "line" "85,5" "85,27" "205,27" "")<br/>&nbsp; (command "line" "85,13" "205,13" "")<br/>&nbsp; (command "line" "100,13" "100,27" "")<br/>&nbsp; (command "line" "120,13" "120,27" "")<br/>&nbsp; (command "line" "132,5" "132,27" "")<br/>&nbsp; (command "line" "162,5" "162,13" "")<br/>&nbsp; (command "line" "180,5" "180,27" "")<br/>&nbsp; (command "layer" "m" "xixian" "")<br/>&nbsp; (command "line" "85,20" "132,20" "")<br/>&nbsp; (command "layer" "m" "wenzi" "c" "5" "" "")<br/>&nbsp; (command "text" "m" (list 188.5 9) 5 0 "清华大学机械厂")<br/>&nbsp; (command "text" "m" (list 147 9) 5 0 (strcat"材料" cl))<br/>&nbsp;&nbsp; (command "text" "m" (list 171 9) 5 0 (strcat"数量" shl))<br/>&nbsp;&nbsp; (command "text" "m" (list 192.5 9) 5 0 (strcat"比例" bl))<br/>&nbsp;&nbsp;&nbsp; (command "text" "m" (list 92.5 23.5) 5 0 "制图")<br/>&nbsp;&nbsp;&nbsp; (command "text" "m" (list 92.5 16.5) 5 0 "校核")<br/>&nbsp;&nbsp;&nbsp; (command "text" "m" (list 156 20) 10 0 ljmch)<br/>&nbsp; (setvar "osmode" v1)<br/>&nbsp; (setvar "cmdecho" v2)<br/>&nbsp; (setvar "blipmode" v3)<br/>&nbsp; (princ)<br/>&nbsp; )</p>

liminnet 发表于 2008-7-1 16:09:00

英雄无敌 发表于 2008-7-1 21:20:00

各位老大,是写错了吧,应该是blipmode,而不是bilpmode
页: [1]
查看完整版本: 请教 AutoCAD 变量设置被拒绝: "bilpmode" 0