TheSwamp
Code Red => Visual DCL Programming => AutoLISP (Vanilla / Visual) => OpenDCL => Topic started by: Lube on April 14, 2015, 11:34:05 AM
-
Hi there!
I was looking for a way to avoid exiting modeless dialogs in autocad (created by opendcl) when [ENTER] is pressed.
Does someone know?
Thanks, Dennis
-
You have to handle the OnCancelClose event and respond accordingly depending on whether to cancel or allow the event to proceed. Take a look at the Events sample (use the OPENDCLDEMO command to run samples quickly). There are also many examples of this in the OpenDCL forum.
-
Thanks Oven, I didn't notice it :)
(defun c:cordoli/cordoli#OnCancelClose (Reason /)
(dcl-MessageBox "Use TAB key")
)
Any way to do nothing without show messageBox? I tried with a (princ) but the dialog closes.
The better thing will be having the same behaviour of the TAB key.
Thanks :)
Dennis
-
This is answered in the event documentation (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Event/CancelClose.htm).
-
Thanks :)