I met a problem when I get Entities form db1 and write them into db2.The exception is :
Autodesk.AutoCAD.Runtime.Exception: eInvalidInput;
Autodesk.AutoCAD.Runtime.Interop.ThrowExceptionForErrorStatus(Int32 errorStatus);
Autodesk.AutoCAD.DatabaseServices.BlockTableRecord.AppendEntity(Entity entity);
DBTransMan tm1;
DBTransMan tm2;
Transaction myT1;
Transaction myT2;
BlockTable bt1;
BlockTable bt2;
Database db1;
Database db2;
DBObjectCollection dboc1;
//Custom function to get all entity from db1
dboc1=GetEntityCollectionFrom(db1);
//Add dboc1 to db2;
for(int i=0;i
{
//This line throw an exception
btr2.AppendEntity(ee);
tm2.AddNewlyCreatedDBObject((Entity)dboc1, true);
}
myT2.Commit();
I developed this with vs.net 2003 and autocad2006,Thanks a lot!