API Reference > OdDg Classes > OdDgDatabase Class > OdDgDatabase Methods > wblockCloneObjects Method > OdDgDatabase::wblockCloneObjects Method (OdDgElementIdArray&, OdDgElementId, OdDgIdMapping&, OdDg::DuplicateRecordCloning, bool)
OdDgDatabase::wblockCloneObjects Method (OdDgElementIdArray&, OdDgElementId, OdDgIdMapping&, OdDg::DuplicateRecordCloning, bool)
Syntax
C++
void wblockCloneObjects(const OdDgElementIdArray& elementIds, OdDgElementId ownerId, OdDgIdMapping& idMap, OdDg::DuplicateRecordCloning duplicateRecordCloning, bool deferXlation = false);
Parameters 
Description 
OdDgElementId ownerId 
[in] Element ID of the owner element.  
OdDgIdMapping& idMap 
[in/out] ID map.  
bool deferXlation = false 
[in] Defer translation. 
objectIds 
[in] Array of Element IDs of the elements to be cloned.  

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

 

idMap associates the Element IDs of the original elements with the Element IDs of the newly created clones. 

When cloning elements 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 elements, but not what they own. 

duplicateRecordCloning must be one of the following: 

 

Name 
Value 
Description 
OdDg::kDrcNotApplicable 
Not applicable to the object. 
OdDg::kDrcIgnore 
If a duplicate record exists, use the existing record in the database, and ignore the clone. 
OdDg::kDrcReplace 
If a duplicate record exists, replace it with the cloned record. 
OdDg::kDrcXrefMangleName 
Incoming record names are mangled with $0$ 
OdDg::kDrcMangleName 
Incoming record names are mangled with $0$ 
OdDg::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.