relaunch a command by pressing enter

Started by Jim Short, May 25, 2015, 07:44:45 AM

Previous topic - Next topic

Jim Short

Autocad can relaunch a command by pressing enter. How does one make this possible when the (command) was issued by a OpenDCL control?
Jim Short

Fred Tomke

Hi, Jim, when you work with modeless forms, you can call events from controls which have EventInvoke set to 1 for AllowCommand. Then they are called as commands.
In one case I called it from a button when property EventInvoke is set to 0 (KeepFocus). In the event handler I set some blackboard variables and finally I call a command asynchronously. If the user hits enter again the latest settings are used from the blackboard.
Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

Jim Short

Still looking for way to relaunch an autocad command previously started by an opendcl event. That way pressing enter is faster than pressing a button again.
Commands run from the pull down menu will relaunch on pressing enter. Should this be possible in OpenDCL asynchronous events?
Jim
Jim Short

roy_043

Try using:
dcl-SendString
or:
vla-sendcommand

Code (autolisp) Select
(vla-sendcommand (vla-get-activedocument (vlax-get-acad-object)) "_COMMAND ")
Note the space at the end of the string.

Jim Short

This works well, Thanks very much!
Jim
Jim Short