OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: Jim Short on September 30, 2012, 06:54:35 AM

Title: ODCL callback runs autolisp comand, run again on enter?
Post by: Jim Short on September 30, 2012, 06:54:35 AM
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?
Title: Re: ODCL callback runs autolisp comand, run again on enter?
Post by: Fred Tomke on September 30, 2012, 01:01:58 PM
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