API Reference > OdDb Classes > OdDbDatabase Class > OdDbDatabase Methods > OdDbDatabase::wblockCloneObjects Method
OdDbDatabase::wblockCloneObjects Method
Syntax
C++
void wblockCloneObjects(const OdDbObjectIdArray& objectIds, OdDbObjectId ownerId, OdDbIdMapping& idMap, OdDb::DuplicateRecordCloning duplicateRecordCloning, bool deferXlation = false);
Parameters 
Description 
const OdDbObjectIdArray& objectIds 
[in] Array of object IDs of the objects to be cloned.  
OdDbObjectId ownerId 
[in] Object ID of the owner object.  
OdDbIdMapping& idMap 
[in/out] ID map.  
bool deferXlation = false 
[in] Defer translation. 

Shallow clones a set of objects and appends the clones to the specified owner object. 

 

idMap associates the object IDs of the original objects with the object IDs of the newly created clones. 

When cloning objects with different owner IDs, a separate call to this function is required for each ownerId. In this case, all but the final call to this function should be made with deferXlation == true. This defers translation until all objects have been cloned. 

A shallow clone is a clone of the specified objects but not what they own. 

duplicateRecordCloning must be one of the following: 

 

Name 
Value 
Description 
OdDb::kDrcNotApplicable 
Not applicable to the object. 
OdDb::kDrcIgnore 
If a duplicate record exists, use the existing record in the database and ignore the clone. 
OdDb::kDrcReplace 
If a duplicate record exists, replace it with the cloned record. 
OdDb::kDrcXrefMangleName 
Incoming record names are mangled with $0$. 
OdDb::kDrcMangleName 
Incoming record names are mangled with $0$. 
OdDb::kDrcUnmangleName 
Unmangle the names mangled by OdDb::kDrcMangleName, then default to OdDb::kDrcIgnore. Typically used by RefEdit when checking records into the original database. 

deepCloneObjects()

Copyright © 2002–2020. Open Design Alliance. All rights reserved.