wblock function returns eVetoed

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
In my ObjectARX application, I am trying to copy the entities from current drawing into a target drawing. For this, I am using AcDbDatabase::wblock function but it returns me error status as eVetoed. Following is extract of my code:
AcDbDatabase pFlatDb = new AcDbDatabase(true, true);
AcDbObjectIdArray tmpArray;
-- //some code to populate tmpArray
--
//pCurDb is current database
Acad::ErrorStatus es = pCurDb->wblock(pFlatDb, tmpArray, AcGePoint3d::kOrigin, AcDb::kDrcIgnore);
if(Acad::eOk != es)
{
acutPrintf(L"\nFailed to copy geometry into new drawing: %s", acadErrorStatusText(es));
delete pFlatDb;
return;
}
The application crashes at the line where I delete the target database (delete pFlatDb).
Am I doing something wrong here? What could be the reason for return status eVetoed and how to handle this situation so that crash does not occur?
Thanks in advance.