The main long transaction classes and functions are
AcDbLongTransaction is the class that contains the information needed to track a long transaction. The AcDbLongTransactionManager class takes the responsibility for creating and appending AcDbLongTransaction objects to the database. It then returns the AcDbObjectId of the AcDbLongTransaction object. Like all other database-resident objects, its destruction is handled by the database.
AcDbLongTransWorkSetIterator provides read-only access to the objects in the work set. During construction in AcDbLongTransaction::newWorkSetIterator(), it can be set up to include only the active work set, or include objects added to the work set because they are referenced by objects in the work set (secondary objects). It can also handle objects removed from the work set, either by AcDbLongTransaction::removeFromWorkSet(), or by being erased.
AcApLongTransactionReactor provides notification specific to long transaction operations. It is designed to be used in conjunction with the deep clone notifications that will also be sent, but will vary depending upon which type of check out/in is being executed. To connect these notifications with the deep clone notifications, the AcDbIdMapping object used for cloning can be retrieved by calling the AcDbLongTransaction::activeIdMap() function.
AcApLongTransactionManager is the manager for starting and controlling long transactions. There is only one for each AutoCAD session, and it is accessed via a pointer returned by the acapLongTransactionManager object.
The wblockCloneObjects() function is a member of AcDbDatase. It will deep clone objects from one database to another and follow hard references so that all dependent objects are also cloned. The behavior of symbol table records, when duplicates are found, is determined by the type parameter. The following chart shows the relationship between a symbol table type (enum DuplicateRecordCloning) and a deep clone type (enum DeepCloneType).
Relationship between DeepCloneTypes and DuplicateRecordCloning for different commands and functions |
||
---|---|---|
Command or API Function |
DeepCloneType |
DuplicateRecordCloning |
COPY |
kDcCopy |
kDrcNotApplicable |
EXPLODE |
kDcExplode |
kDrcNotApplicable |
BLOCK |
kDcBlock |
kDrcNotApplicable |
INSERT/BIND |
kDcXrefInsert |
kDrcIgnore |
XRESOLVE |
kDcSymTableMerge |
kDrcXrefMangleName |
INSERT |
kDcInsert |
kDrcIgnore |
insert() |
kDcInsertCopy |
kDrcIgnore |
WBLOCK |
kDcWblock |
kDrcNotApplicable |
deepCloneObjects() |
kDcObjects |
kDrcNotApplicable |
wblockObjects() |
kDcObjects |
kDrcIgnore |
wblockObjects() |
kDcObjects |
kDrcReplace |
wblockObjects() |
kDcObjects |
kDrcMangleName |
wblockObjects() |
kDcObjects |
kDrcUnmangleName |