VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

cancel commands

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
183 Views, 6 Replies

cancel commands

Hi.

In AutoCAD 14 you could send chr(27) to cancel a command in
thisdrawing_begincommand.
This does not work in A2K. Is there any other way to cancel a command
(without undefining the command) ?

Trond Hasse Lie
Nestor
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

Have you tried Chr(3)?

--
Attitudes are contagious. Is yours worth catching?
http://www.acadx.com

Trond Hasse Lie wrote in message
news:8282C55D503C00CF4D86B65E14B55FD4@in.WebX.SaUCah8kaAW...
> Hi.
>
> In AutoCAD 14 you could send chr(27) to cancel a command in
> thisdrawing_begincommand.
> This does not work in A2K. Is there any other way to cancel a command
> (without undefining the command) ?
>
> Trond Hasse Lie
> Nestor
>
Message 3 of 7
Anonymous
in reply to: Anonymous

Now I have tried... didn't help much.

Try this code in 14 and 2000, and see the difference....

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
If CommandName = "OPEN" Then
SendKeys Chr(27)
End If
End Sub

Trond Hasse Lie
Nestor

"Frank Oquendo" wrote in message
news:8088E906D4FE732005EE56130384F869@in.WebX.SaUCah8kaAW...
> Have you tried Chr(3)?
>
> --
> Attitudes are contagious. Is yours worth catching?
> http://www.acadx.com
>
> Trond Hasse Lie wrote in message
> news:8282C55D503C00CF4D86B65E14B55FD4@in.WebX.SaUCah8kaAW...
> > Hi.
> >
> > In AutoCAD 14 you could send chr(27) to cancel a command in
> > thisdrawing_begincommand.
> > This does not work in A2K. Is there any other way to cancel a command
> > (without undefining the command) ?
> >
> > Trond Hasse Lie
> > Nestor
> >
>
Message 4 of 7
Anonymous
in reply to: Anonymous

Hi Trond,
please try
ThisDrawing.SendCommand Chr(27)

The function Chr(27) returns Esc.
Autocad interprete this as an Esc touch.

Antonio Barroca
AMG Product Support CH
WW Support & Services

Trond Hasse Lie wrote in message
news:8282C55D503C00CF4D86B65E14B55FD4@in.WebX.SaUCah8kaAW...
> Hi.
>
> In AutoCAD 14 you could send chr(27) to cancel a command in
> thisdrawing_begincommand.
> This does not work in A2K. Is there any other way to cancel a command
> (without undefining the command) ?
>
> Trond Hasse Lie
> Nestor
>
Message 5 of 7
Anonymous
in reply to: Anonymous

Oh... I have tried.... But no.... It doesn't work in a2k....

Trond Hasse Lie
Nestor

"Antonio Barroca Pires" wrote in message
news:A071F6207073006B11845F88AFB43F26@in.WebX.SaUCah8kaAW...
> Hi Trond,
> please try
> ThisDrawing.SendCommand Chr(27)
>
> The function Chr(27) returns Esc.
> Autocad interprete this as an Esc touch.
>
> Antonio Barroca
> AMG Product Support CH
> WW Support & Services
>
> Trond Hasse Lie wrote in message
> news:8282C55D503C00CF4D86B65E14B55FD4@in.WebX.SaUCah8kaAW...
> > Hi.
> >
> > In AutoCAD 14 you could send chr(27) to cancel a command in
> > thisdrawing_begincommand.
> > This does not work in A2K. Is there any other way to cancel a command
> > (without undefining the command) ?
> >
> > Trond Hasse Lie
> > Nestor
> >
>
Message 6 of 7
Anonymous
in reply to: Anonymous

Greetings, salutations, Moo

This will work "most" of the time and with "most" commands

SendKeys "{ESC}" & "{ESC}"

Randall Rath
Message 7 of 7
Anonymous
in reply to: Anonymous

Thank you, thank you, THANK you....

THL

"Randall Rath" wrote in message
news:309FD7F52A1D164683C960BB0246E2CC@in.WebX.SaUCah8kaAW...
> Greetings, salutations, Moo
>
> This will work "most" of the time and with "most" commands
>
> SendKeys "{ESC}" & "{ESC}"
>
> Randall Rath
>

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost