What is it that's under the NOD that you expect to be cloned that is not?
The code you show is simply cloning entities from a BlockTableRecord, so the
only other objects that should be cloned are objects that are hard
referenced, directly or indirectly, by the entities being cloned.
wrote in message news:6230360@discussion.autodesk.com...
Hi,
I have been able to clone all objects from one drawing to other, but the
contents under nod are not cloned. I used the wblockclone method.Is there an
error in this method?
foreach (ObjectId objID in sourceBTR)
{
Entity ent = (Entity)sourceTrans.GetObject(objID,
OpenMode.ForRead);
if (ent.Layer != "0")
{
//Add the entity if it is not layer 0 to the
object id collection
acObjIdColl.Add(ent.ObjectId);
}
}
IdMapping acIdMap = new IdMapping();
try
{
//Clone objects from source database
sourceDB.WblockCloneObjects(acObjIdColl,
destBTR.ObjectId, acIdMap, DuplicateRecordCloning.Ignore, false);
}
catch (Autodesk.AutoCAD.Runtime.Exception ex)
{
ed.WriteMessage("\n Error: " + ex.Message);
}