TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: domenicomaria on January 28, 2021, 06:36:09 AM

Title: LAST COMMAND
Post by: domenicomaria on January 28, 2021, 06:36:09 AM
Normally
if I press the space bar
Acad executes the last command.

is there a way to obtain that an LSP command (c: XXX type)
becomes the LAST COMMAND, without using it before ?


The question might seem strange. . .

I made with OpenDCL a modeless module that contains buttons that send LSP commands to Acad. . .

If after, I hit enter, Acad doesn't execute the last LSP command (type c: XXX)

But executes the last pure ACAD command (for example copy, delete, line ...)
Title: Re: LAST COMMAND
Post by: DanW on January 28, 2021, 09:30:13 AM
An alternative method would be to trigger the function by sending a string to the command line.  CAD would act then like you typed a command .

eg (dcl-SendString "MyFunction\n")
Title: Re: LAST COMMAND
Post by: Marc'Antonio Alessi on January 28, 2021, 12:25:43 PM
From big Lee Mac:            http://www.theswamp.org/index.php?topic=56351.msg602161#msg602161 (http://www.theswamp.org/index.php?topic=56351.msg602161#msg602161)
Title: Re: LAST COMMAND
Post by: domenicomaria on January 28, 2021, 12:49:49 PM
An alternative method would be to trigger the function by sending a string to the command line.  CAD would act then like you typed a command .

eg (dcl-SendString "MyFunction\n")

Great !
It works !

Thank you very much !
Title: Re: LAST COMMAND
Post by: domenicomaria on January 28, 2021, 12:53:45 PM
From big Lee Mac:            http://www.theswamp.org/index.php?topic=56351.msg602161#msg602161 (http://www.theswamp.org/index.php?topic=56351.msg602161#msg602161)

Marco,
be aware that DCL and OpenDCL are completely different !

I use an OpenDCL command 'dcl-SendString'
to send a command to Acad
from an OpenDCL modeless form
. . .
It is similar but not the same !
Title: Re: LAST COMMAND
Post by: BIGAL on January 28, 2021, 06:45:02 PM
What about vla-sendcommand it sends a string to command line.
Title: Re: LAST COMMAND
Post by: android.paranoid on April 22, 2021, 06:29:10 AM
Is there way to call command just before the last one?
I often use series of only two commands, for example polyline and circle.
It would be great if I could call another, maybe with shift+space...