• Industries
  • Products
  • Buy
  • Services & Support
  • Communities
  • Discussion Groups

    .NET

    Reply
    *Tony Tanzillo

    acedUserBreak in managed code

    102 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
    Please use plain text.
    *Albert Szilvasy

    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
    Please use plain text.
    *Tony Tanzillo

    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
    Please use plain text.