Changes in COM SDK for IAcadDocument Interface for Versions 2018 and 2019

Four new methods can be used by 3rdparty applications to suppress real-time graphic area updates and to improve the document modification performance:

  • StartTransaction(): Starts a new transaction of this document.
    HRESULT StartTransaction();

  • EndTransaction(): Ends the current transaction associated with this document.
    HRESULT EndTransaction();

  • AbortTransaction(): Aborts the current transaction associated with this document.
    HRESULT AbortTransaction();

  • NumActiveTransactions(): Returns the number of active transactions associated with this document.
    HRESULT NumActiveTransactions( [ out, retval ] int* pTransaction );

Changes of the document’s database are included between calls of the Start and End transactions methods. All modification in the graphics area are updated after calling the EndTransaction() method.
AbortTransaction() method cancels all changes done inside the document database after calling StartTransaction();
New COM sample project “UseOfTransaction” is available along with existing ARES Commander examples.