@s_plant wrote:
... when start to invoke the lisp I get this error:
"ERR_CTRL version 1.4 loaded.
>From point:
To point:
Cannot invoke (command) from *error* ....
....
(command "_.UNDO" "_G")
(command "_.UNDO" "_BE")
....
There appears to be more wrong than just the (command)-in-*error* problem, if you're getting that message upon giving a point.... But in any case:
There should be something in your error handler that is similar to those Undo-related commands but with the End option, and that is where you should change function names from (command ...) to (command-s ...). HOWEVER, if you are also running any computers with AutoCAD older than [I think] 2015, they won't recognize (command-s) as a function. If you have AutoLisp routines with *error* handlers that need to run on both older and newer versions of AutoCAD, you may need to switch to (vla) methods of starting and ending the Undo wrapping, avoiding either (command) or (command-s). Write back if that's what you need to do, or Search for
(vla-startundomark
to find examples of code that does it that way.
Kent Cooper, AIA