Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all,
I'm trying to override ObjectOverrule.DeepClone behavior to copy ployline and it's associative hatches.Associative Hatch
the following code throws exception when trying to copy hatches.
public override DBObject DeepClone(DBObject dbObject, DBObject ownerObject, IdMapping idMap, bool isPrimary)
{
Document document = Application.DocumentManager.GetDocument(dbObject.Database);
DBObject clonedObject = base.DeepClone(dbObject, ownerObject, idMap, isPrimary);
//Copy Hatch
ObjectIdCollection persistentID = dbObject.GetPersistentReactorIds();
IdMapping map = new IdMapping();
document.Database.DeepCloneObjects(persistentID, document.Database.CurrentSpaceId, map, false);
return clonedObject;
} ExceptionThanks in advance.
Solved! Go to Solution.