高版本CAD中空白处双击执行自定义LISP函数的问题
本人不懂反应器,在这个网站找到一段代码,可以实现在CAD中空白处双击执行自定义LISP函数,如下完整代码。自定义的函数是TEMP, 这个代码在ACAD2014中执行的很完美,但是在ACAD2021中有问题,有点时候成功有的时候不成功:(。那位大师给看看。谢谢
;;; 加载双击反应器
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
(setq *dblclkReactor*(VLR-Mouse-Reactor nil'((:VLR-beginDoubleClick . dblclkedit)))))
(defun dblclkedit(reactorObject point)
(if dblclk-edit(dblclk-edit point))
)
;;; 自定义双击反应器Double Click Reactor
(defun dblclk-edit (dblclk_point / owner dblclk_etype p)
(setq owner (nentselp (setq p (trans (car dblclk_point) 0 1))));;指定点来选择对象
(if (and (= owner nil) (= 0 (getvar 'cmdactive))) ;_有活动命令时不起作用
(vla-sendcommand (vla-get-activedocument(vlax-get-acad-object)) (strcat (rtos (car p) 2 3) "," (rtos (cadr p) 2 3) " temp "))
)
)
(defun c:temp() (alert "ok") (princ))
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgsAAAB3CAYAAACNIANdAAAbfElEQVR4nO3dLY/qUIA+8IfNfoxpUoPArFpBSUgw2DoEJAhIsAgcCAQCHKLJKhIQJEXgajEkk7R8AwSmSfkG+//rrjh9p5TyNncu9/klk9wLUzhlSnt63p7Cf/13zcUV/+///y/01f8E/3ddEzNlAMN/QJ3DGgKzro32sgmpUIA57cBuL9GSCqmv6egdrOUlRhXxvOvo6K5lrEaV2O+55hTKwIA6t4LfJSIiop/3H3dvoc5xOBxgWXOo0cfPG3TKZQyMIuSvfC9lTstQGhogS3cXg4iIiH5G4Z6WhTSua8ZaFm5JtiwQERHR7/Z0ZYGIiIg+2/3dEERERPRPYWWBiIiIMj1VWXAdHZ3yFKZ7tSfjJdvcVSZzio7uhO81Ne/b3jUx7ehwnijfrddw9A6m5v2v/8j++MxpB7rjQO90oDuv++xd18TUK1P038Hz5vShfaW/zyu+O0T0O/3noxu6roP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8seNnmljVHLNH8LDLJB0YRcs5Me3MqMsyjWeXPUtp9QGt4eecd6I6LQqGC4baP0yCS5557ymaYAy9mdTDljIiI/i2MqM7wJ6NliYiIfounxywUChWM7pjGILVWeNGwRSIiIvoBTJ0kIiKiTP/GbIgHiWmfXFWSiIj+bYyoJiIiokyMqCYiIqJMjKgmIiKiTB8VUU1ERESvx4hqIiIiyvQxEdVERET0Hh8TUU1ERETv8W9EVBMREdHD/g/G1fyLkVJ4lgAAAABJRU5ErkJggg==
如上图,在ACAD2021中空白处双击了5-6次,最后成功了一次,且还输出 “命令: 3811.357,1315.803 未知命令“357,1315.803”。按 F1 查看帮助。”
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
(setq *dblclkReactor*(VLR-Mouse-Reactor nil'((:VLR-beginDoubleClick . dblclkedit)))))
(defun dblclkedit(reactorObject point)
(if dblclk-edit(dblclk-edit point))
)
;;; 自定义双击反应器Double Click Reactor
(defun dblclk-edit (dblclk_point / owner dblclk_etype p)
(setq owner (nentselp (setq p (trans (car dblclk_point) 0 1))));;指定点来选择对象
(if (and (= owner nil) (= 0 (getvar 'cmdactive))) ;_有活动命令时不起作用
(if (> (atof (getvar "acadver")) 19.2)
(vlax-invoke-method (vlax-get-or-create-object "WScript.Shell") 'SendKeys "temp " )
(vla-sendcommand (vla-get-activedocument(vlax-get-acad-object)) (strcat (rtos (car p) 2 3) "," (rtos (cadr p) 2 3) " temp "))
)
)
)
(defun c:temp() (alert "ok") (princ)) 还有这种高端操作,是不是可以鼠标手势不同命令 坐等大师过来指导下! 好用,非常感谢,牛! xiaoyingzi 发表于 2023-5-18 01:54
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
大佬怎么实现框选后双击执行呢,直接双击容易误操作 xiaoyingzi 发表于 2023-5-18 01:54
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
大佬怎么实现框选后双击执行呢,直接双击容易误操作 xiaoyingzi 发表于 2023-5-18 01:54
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
希望在布局视口激活的情况下
双击空白返回到布局
但无法实现意图
(defun c:temp()
(if (and
(/= "MODEL" (strcase (getvar "ctab")))
(/= 1 (getvar "cvport"))
)
(vla-put-mspace (vla-get-activedocument (vlax-get-acad-object)) :vlax-false)
)
(princ)
)
以上单独执行没问题
空白双击不起作用
应该是“返回布局后又进入了视口”
请问可有解决办法 xiaoyingzi 发表于 2023-5-18 01:54
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
大佬,这个双击反应器有适配cad全版本的吗 本帖最后由 wyy81061 于 2024-11-18 15:14 编辑
xiaoyingzi 发表于 2023-5-18 01:54
(vl-load-com)
(if (not *dblclkReactor*);;0 = 打开反应器
不好意思,2024也可以,是我用了自动输入法的全局控制
页:
[1]