ODCL callback runs autolisp comand, run again on enter?

Started by Jim Short, September 30, 2012, 06:54:35 AM

Previous topic - Next topic

Jim Short

I have an autolisp ODCL call back that runs fine.
It could evaluate a (defun c:somecommand ()) that would repeat if enter pressed at the command line. 
Is there a way to register it with autocad such that it can be run again by pressing enter,
just as if the command had been run at the command line?
Jim Short

Fred Tomke

Hi, Jim, I'm not sure if I understand right, but I use it this way:
(defun c:proj_form_button ()
  (dcl_sendstring "StartMyCommand")
); c:proj_form_button

;;; additional Command
(defun StartMyCommand()
  (do_something)
); StartMyCommand

Is it that what you mean?

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]