gpt4 book ai didi

dialog - OPENDCL(AUTOCAD): avoid exiting modeless dialog if [ENTER] is pressed

转载 作者:太空宇宙 更新时间:2023-11-03 18:54:37 27 4
gpt4 key购买 nike

我正在寻找一种方法来避免在按下 [ENTER] 时退出 autocad 中的无模式对话框(由 opendcl 创建)。

有什么想法吗?

谢谢,丹尼斯

最佳答案

我已经为 OpenDCL 网格系统实现了这样的功能。您必须激活表单上的 OnCancelClose 函数。我是这样做的:

(defun c:MyFunction_Form1_OnCancelClose (Reason /)
;; Reason = 0 when Enter is pressed
(if (= Reason 0)
(progn
;; Shift active editing cell one row down
(setq rowAndCol(dcl_Grid_GetCurCell MyFunction_Form1_revisions))
(dcl_Grid_StartCellEdit MyFunction_Form1_revisions (1+ (car rowAndCol)) (cadr rowAndCol))
)
)

;; Reason = 1 when ESC key is pressed, or the closing button in the titlebar
;; is clicked. Hence, enter won't work to cancel the dialog
(/= Reason 1)
)

关于dialog - OPENDCL(AUTOCAD): avoid exiting modeless dialog if [ENTER] is pressed,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29630881/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com