本帖最后由 作者 于 2008-6-22 14:38:01 编辑
帮忙看看这段程序。
按S后的选择跟PICKAUTO=0时的选择一样,就是点空白地方不能自动用交叉窗口选择。可是明明PICKAUTO=1了- ;;;;下面是定义填充范围
- (defun getarea() (while (/= 0 (getvar "cmdactive"))(princ "\n 指定PboHatch内部点或 [选择对象(S)]:")(command pause)))
- ;;;;下面是定义填充好后自动改到正确图层
- (defun hatchcly () (while (/= 0 (getvar "cmdactive"))(command pause))(if (not (tblsearch "layer" "!0-hatch"))(command "-layer" "n" "!0-hatch" "c" "8""!0-hatch"""))(if (not (equal entmp1 (entlast)))(command ".CHPROP" "L" "" "LA" "!0-hatch" "")(princ "填充失败!"))(princ))
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- (defun C:ht1 ()(setq entmp1 (entlast))(command "-hatch" "p" "!amberina" "1" "0" (getarea))(hatchcly));
我不会编程,望大家指教。
现在的情况就是:
1、输入命令HT1后,默认点选内部,这个没问题,问题在于,按S后,选择对象时只能一个一个地去选,不是交叉窗口选择。跟PICKAUTO=0时的情况一样,可是已经设置PICKAUTO=1了。
2、如果只是执行- (command "-hatch" "p" "!amberina" "1" "0" )
其它代码不要。就完全没问题(即默认是点选内部,按S后是交叉窗口选择对象)
不知我表达清楚没
应该怎么改啊。望指点。。。
|