.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

acedUserBreak in managed code

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
295 Views, 2 Replies

acedUserBreak in managed code

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
2 REPLIES 2
Message 2 of 3
Anonymous
in reply to: Anonymous

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
Message 3 of 3
Anonymous
in reply to: Anonymous

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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost