cannot invoke (command) from *error* without prior call to (*push-error-using-command*).

cannot invoke (command) from *error* without prior call to (*push-error-using-command*).

Anonymous
Not applicable
4,297 Views
5 Replies
Message 1 of 6

cannot invoke (command) from *error* without prior call to (*push-error-using-command*).

Anonymous
Not applicable

I am running a LISP Command on AutoCAD but this strange message when ESC key or any invalid input is given to the command.

 

Can anyone help me with this?

Thanks in advance.!!

 

0 Likes
4,298 Views
5 Replies
Replies (5)
Message 2 of 6

dbroad
Mentor
Mentor

Firstly, you are posting to the wrong group.  Post LISP questions in the LISP customization forum.

Secondly, hitting the ESC key caused a "cancel"  error. Your *error* handler tried to use the command vs command-s function.  That can't be done anymore without getting that message. If you didn't write the LISP, contact whomever you got it from. If you did, fix it or live with it.

Architect, Registered NC, VA, SC, & GA.
0 Likes
Message 3 of 6

Kent1Cooper
Consultant
Consultant

That is normally not the entire message, but is followed by the suggestion to change (command) functions to (command-s).  So do that, only in any (command) functions that are inside the *error* handler in the routine.  For example, if it did UNDO Begin in a (command) function at the beginning, and it has an *error* handler that, in case of cancellation, does [possibly among other things] UNDO End in this way:

 

(defun *error* (msg)

  (command "_.undo" "_end")

)

 

just change that as the message suggests:

 

(defun *error* (msg)

  (command-s "_.undo" "_end")

)

Kent Cooper, AIA
Message 4 of 6

Moshe-A
Mentor
Mentor

@dbroad ,

 

Wrong forum?

 

the Visual LISP, AutoLISP and General Customization is part of the AutoCAD Customization group (which also includes VBA, .NET and ObjectARX)

 

so where is 'customization forum'?

 

 

0 Likes
Message 5 of 6

Kent1Cooper
Consultant
Consultant

@Moshe-A wrote:

@dbroad ,

 

Wrong forum?

....


[It's now in the right Forum.  I assume it was originally posted elsewhere, was Reported as being better here, and was moved here.]

Kent Cooper, AIA
0 Likes
Message 6 of 6

dbroad
Mentor
Mentor

It was originally in the AutoCAD Architecture forum.  Give me a little credit. OK?

Architect, Registered NC, VA, SC, & GA.
0 Likes