deepClone()

The AcDbHardPointerId reference problem mentioned above will not occur in this case because deepClone() does not follow AcDbHardPointerId references for cloning.

An application may create problems during deepClone() if it attempts to add new entities while the AcDbObjectIds are still in flux. Therefore, never attempt to call AcDbBlockTableRecord::appendAcDbEntity() on any cloned, user-defined AcDbBlockTableRecords until after the AcEditorReactor::endDeepClone() notification has been given. In contrast, you may safely append to the model space and paper space AcDbBlockTableRecords, because these are never cloned in deepClone(). Never try to add vertices to cloned AcDb2dPolylines, AcDb3dPolylines, AcDbPolyFaceMeshes, or AcDbPolygonMeshes, attributes to cloned AcDbBlockReferences, or entries to cloned dictionaries, until after the AcEditorReactor::endDeepClone() notification.

If you must create the entities during the cloning, then you will need to keep them in memory, along with their future owner's ID, until after the AcEditorReactor::endDeepClone() notification. They can be safely appended once the deep clone is completed.