Message 1 of 4
error using insert function
Not applicable
11-26-2002
01:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I try to execute next code I obtain "Error inserting a block"
Debugging it I see ErrorStatus code "eHandleInUse".
Anyone can help me?
----------------------------------------------------------------------------
-------------------------------------------------
AcDbDatabase *pDwg =new AcDbDatabase (Adesk::kFalse, Adesk::kTrue) ;
pDwg->readDwgFile ("c:\\myfile.dwg") ;
//----- Put it into a block table record of the current database
AcDbObjectId id ;
Acad::ErrorStatus es =
acdbHostApplicationServices()->workingDatabase()->insert (id, "myfile",
pDwg, Adesk::kTrue) ;
if ( es != Acad::eOk ) // here I obtain eHandleInUse
acutPrintf ("\nError inserting a block.") ;
delete pDwg ;
----------------------------------------------------------------------------
-------------------------------------------------
Thanks in advance!
Luis.
Debugging it I see ErrorStatus code "eHandleInUse".
Anyone can help me?
----------------------------------------------------------------------------
-------------------------------------------------
AcDbDatabase *pDwg =new AcDbDatabase (Adesk::kFalse, Adesk::kTrue) ;
pDwg->readDwgFile ("c:\\myfile.dwg") ;
//----- Put it into a block table record of the current database
AcDbObjectId id ;
Acad::ErrorStatus es =
acdbHostApplicationServices()->workingDatabase()->insert (id, "myfile",
pDwg, Adesk::kTrue) ;
if ( es != Acad::eOk ) // here I obtain eHandleInUse
acutPrintf ("\nError inserting a block.") ;
delete pDwg ;
----------------------------------------------------------------------------
-------------------------------------------------
Thanks in advance!
Luis.