ObjectARX

Reply
*HokuS
Message 1 of 7 (113 Views)

^C^C

113 Views, 6 Replies
06-27-2005 05:57 AM
How to emulate well known in AutoCAD "^C^C" statement, you know to cancel
the current command prompt, with ObjectARX?

Thanks
*Jim Awe
Message 2 of 7 (113 Views)

Re: ^C^C

06-27-2005 03:11 PM in reply to: *HokuS
Try sending two ESC's to the command line, like:

acedGetAcadTextCmdLine()->SendMessage(WM_CHAR, VK_ESCAPE, 0);

acedGetAcadTextCmdLine()->SendMessage(WM_CHAR, VK_ESCAPE, 0);

There might be a better way than that now, but that is how we used to do
it...

Jim Awe
Autodesk, Inc.

"HokuS" wrote in message
news:4885775@discussion.autodesk.com...
How to emulate well known in AutoCAD "^C^C" statement, you know to cancel
the current command prompt, with ObjectARX?

Thanks
*Tony Tanzillo
Message 3 of 7 (113 Views)

Re: ^C^C

06-27-2005 05:01 PM in reply to: *HokuS
You can also use:

extern int acedPostCommand(char const *)

like this:

acedPostCommand("\03\03");

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"HokuS" wrote in message news:4885775@discussion.autodesk.com...
How to emulate well known in AutoCAD "^C^C" statement, you know to cancel
the current command prompt, with ObjectARX?

Thanks
Distinguished Contributor
chuck.han
Posts: 123
Registered: ‎09-27-2004
Message 4 of 7 (113 Views)

Re: ^C^C

06-27-2005 07:43 PM in reply to: *HokuS
I don't think acedPostCommand() is available in ObjectArx 2006. You can try using:

acDocManagerPtr()->sendStringToExecute(acDocManagerPtr()->curDocument(), "\x1B\x1B");

But remember that AutoCAD might not executed it when you want it to...
*Tony Tanzillo
Message 5 of 7 (113 Views)

Re: ^C^C

06-27-2005 10:03 PM in reply to: *HokuS
wrote

>> I don't think acedPostCommand() is available in ObjectArx 2006.

It certainly is.

Were it not available, I would have a few broken
apps that would not work at all.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
Distinguished Contributor
chuck.han
Posts: 123
Registered: ‎09-27-2004
Message 6 of 7 (113 Views)

Re: ^C^C

06-28-2005 06:44 AM in reply to: *HokuS
Huh.

Sorry to continue this discussion in this thread, but I don't know how else to contact Tony (your website has a contact link, but it doesn't lead to any contact info).

I can't find any reference to acedPostCommand() in the ObjectArx online reference (index/search) or the index of the hardcopy ObjectArx Developer's Guide (both for AutoCAD 2006). Is it supported/deprecated but not documented? Something else?

thanks, Chuck
*Alexander Rivilis
Message 7 of 7 (113 Views)

Re: ^C^C

06-28-2005 08:57 AM in reply to: *HokuS
Hi, chuck.han!
This function is not documented and is not supported, but working in AutoCAD R14...2006 .
It exported by acad.exe and is in acad.lib You need add this statement your's code:

extern int acedPostCommand(char const *cmd);

After then you can use acedPostCommand("\03\03") for canceling any active command;

ch> I can't find any reference to acedPostCommand() in the ObjectArx online
ch> reference (index/search) or the index of the hardcopy ObjectArx
ch> Developer's Guide (both for AutoCAD 2006). Is it supported/deprecated
ch> but not documented? Something else?

Best Regards,
Alexander Rivilis.
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Do you have 60 seconds to spare? The Autodesk Community Team is revamping our site ranking system and we want your feedback! Please click here to launch the 5 question survey. As always your input is greatly appreciated.