2007-08-15 17:44 UTC
I used the function of error of Selections.lsp of the examples of OpenDcl to show my problem.
I need to play a message in the line of command of AutoCAD, when the user presses ESC.
Attention cannot use DCL_MESSAGEBOX.
I need to use (princ "FUNÇÃO CANCELADA PELO USUÁRIO ") or similar thing.
The message is always hidden of the user it can only be seen with the key F2.
Does anybody can me to say because this happens?
Thanks
I need to play a message in the line of command of AutoCAD, when the user presses ESC.
Attention cannot use DCL_MESSAGEBOX.
I need to use (princ "FUNÇÃO CANCELADA PELO USUÁRIO ") or similar thing.
The message is always hidden of the user it can only be seen with the key F2.
Does anybody can me to say because this happens?
Thanks
;;Standard error trap
(DEFUN *error* (msg)
(WHILE (< 0 (GETVAR "cmdactive")) (COMMAND))
(COND
((NOT msg)) ; no error, do nothing
((VL-POSITION
(STRCASE msg T) ; cancel
'("console break" "function cancelled" "quit / exit abort")
)
;; just for the Demo ...
;;;(DCL_MESSAGEBOX ".... Quit/Exit/Abort/*Cancelled*"
;;;"Inside Error Handler" ; Form Caption
;;;2 ; OK Button Only
;;;1 ; exclamation point icon is displayed in the message box.
;;; )
;;;MY MESSAGE
(princ "FUNÇÃO CANCELADA PELO USUÁRIO")
)
((PRINC (STRCAT "\nApplication Error: " (GETVAR "errno") " :- " msg)
)
)
)
(SETVAR "errno" 0)
;;
;;
(SETQ bflag nil)
(DCL_FORM_CLOSE Selections_Form)
(SETVAR "BLIPMODE" blipper)
(VL-CMDF "._REGEN")
(SETVAR "CMDECHO" echo)
(PRINC)
)