.NET

Reply
*Tony Tanzillo
Message 1 of 3 (121 Views)

acedUserBreak in managed code

121 Views, 2 Replies
07-02-2005 11:57 AM
Is any of this functionality exposed in the managed wrappers?

int acedUserBrk()
void acedDisableUsrbrk()
void acedEnableUsrbrk()
bool acedIsUsrbrkDisabled()
int acedUsrBrkWithMessagePump()


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
*Albert Szilvasy
Message 2 of 3 (121 Views)

Re: acedUserBreak in managed code

07-04-2005 09:28 PM in reply to: *Tony Tanzillo
None of these are exported. The first 4 are rather simple (acedUserBrk() is
really just a glorified way to call GetAsynKeyState())
Be careful when using acedUsrBrkWithMessagePump() because it does what the
name suggests. Pumping the message loop in the middle of a long running
operation is very dangerous. You have no idea what messages get dispatched
and whether the message handlers that do get invoked expect or tolerate the
state that your long running operation created (object being open, document
locked etc.) Prior to AutoCAD 2006 acedUsrBrk did what
acedUsrBrkWithMessagePump does today but it became one of the worst source
of customer error reports and we basically eliminated all but 2 message
pumping user breaks. (scripts and lisp still "pump" between commands)

albert

"Tony Tanzillo" wrote in message
news:4891822@discussion.autodesk.com...
Is any of this functionality exposed in the managed wrappers?

int acedUserBrk()
void acedDisableUsrbrk()
void acedEnableUsrbrk()
bool acedIsUsrbrkDisabled()
int acedUsrBrkWithMessagePump()


--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
*Tony Tanzillo
Message 3 of 3 (121 Views)

Re: acedUserBreak in managed code

07-05-2005 07:56 AM in reply to: *Tony Tanzillo
Thanks for the info.

I know that pumping messages is dangerous. I found
that out the hard way. The main reason for wanting
to do that was to get output from acutPrintf() and the
WriteMessage() wrapper to display immediately.

IAcadApplication::Update() seems to help, but the
UpdateScreen() member of AcadApplication and the
Editor does not (they just call acedUpdateDisplay)

--
http://www.caddzone.com

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

"Albert Szilvasy" wrote in message news:4892419@discussion.autodesk.com...
None of these are exported. The first 4 are rather simple (acedUserBrk() is
really just a glorified way to call GetAsynKeyState())
Be careful when using acedUsrBrkWithMessagePump() because it does what the
name suggests. Pumping the message loop in the middle of a long running
operation is very dangerous. You have no idea what messages get dispatched
and whether the message handlers that do get invoked expect or tolerate the
state that your long running operation created (object being open, document
locked etc.) Prior to AutoCAD 2006 acedUsrBrk did what
acedUsrBrkWithMessagePump does today but it became one of the worst source
of customer error reports and we basically eliminated all but 2 message
pumping user breaks. (scripts and lisp still "pump" between commands)

albert

"Tony Tanzillo" wrote in message
news:4891822@discussion.autodesk.com...
Is any of this functionality exposed in the managed wrappers?

int acedUserBrk()
void acedDisableUsrbrk()
void acedEnableUsrbrk()
bool acedIsUsrbrkDisabled()
int acedUsrBrkWithMessagePump()


--
http://www.caddzone.com

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

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.