Message 1 of 4
INSERT fails with eNotThatKindOfClass
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
In the attached drawing, the INSERT command fails with *Invalid*. Further probing with ObjectARX code here:
void InsertTest()
{
// Create a new database and read the drawing
AcDbDatabase *pInsDb = new AcDbDatabase;
Acad::ErrorStatus es = pInsDb->readDwgFile("C:\\Test.dwg");
if (es != Acad::eOk) { acutPrintf("\nError %s reading\n", acadErrorStatusText(es)); return; }
// Insert the drawing into the current drawing
// ** THIS WILL GENERATE "eNotThatKindOfClass" ERROR
es = acdbHostApplicationServices()->workingDatabase()->insert(AcGeMatrix3d::kIdentity, pInsDb);
if (es != Acad::eOk) { acutPrintf("\nError %s inserting\n", acadErrorStatusText(es)); delete pInsDb; return; }
delete pInsDb;
}
The message "Error eNotThatKindOfClass inserting" appears.
What could be the reason? This is driving me nuts, since these drawings are created by a large OARX application created by us, with two separate custom entities. How do I probe and find out what is causing this problem? It happens intermittently and never on the development systems, only in customer places. 😞
void InsertTest()
{
// Create a new database and read the drawing
AcDbDatabase *pInsDb = new AcDbDatabase;
Acad::ErrorStatus es = pInsDb->readDwgFile("C:\\Test.dwg");
if (es != Acad::eOk) { acutPrintf("\nError %s reading\n", acadErrorStatusText(es)); return; }
// Insert the drawing into the current drawing
// ** THIS WILL GENERATE "eNotThatKindOfClass" ERROR
es = acdbHostApplicationServices()->workingDatabase()->insert(AcGeMatrix3d::kIdentity, pInsDb);
if (es != Acad::eOk) { acutPrintf("\nError %s inserting\n", acadErrorStatusText(es)); delete pInsDb; return; }
delete pInsDb;
}
The message "Error eNotThatKindOfClass inserting" appears.
What could be the reason? This is driving me nuts, since these drawings are created by a large OARX application created by us, with two separate custom entities. How do I probe and find out what is causing this problem? It happens intermittently and never on the development systems, only in customer places. 😞