.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

A problem of adding entities from one Database from another.

0 REPLIES 0
Reply
Message 1 of 1
Anonymous
133 Views, 0 Replies

A problem of adding entities from one Database from another.

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!
0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost