INSERT fails with eNotThatKindOfClass

INSERT fails with eNotThatKindOfClass

deltacadd
Contributor Contributor
321 Views
3 Replies
Message 1 of 4

INSERT fails with eNotThatKindOfClass

deltacadd
Contributor
Contributor
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. 😞
0 Likes
322 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
One thing that I'd try is to do it without the custom entities.
Also check the proxy flags: have you enabled cloning?

Henrik Vallgren
0 Likes
Message 3 of 4

Anonymous
Not applicable
> The message "Error eNotThatKindOfClass inserting" appears.

I didn't look at the .dwg you attached, but a common cause of this error
is a drawing saved in a later version of AutoCAD back to an earlier version
file format. You don't say what AutoCAD version(s) or file format
version(s) are involved, so this is just a guess. 🙂
--
Owen Wengerd
President, ManuSoft ==> http://www.manusoft.com
VP Americas, CADLock, Inc. ==> http://www.cadlock.com
0 Likes
Message 4 of 4

deltacadd
Contributor
Contributor
The AutoCAD version is 2006 with SP1 applied. The problem existed before SP1 and still exists after SP1. There is no other file format conversion involved (i.e., everything stays in AutoCAD 2006) and there is also no other version or flavour of AutoCAD involved (just vanilla 2006).

I have an application that generates drawings automatically based on certain inputs and this problem crops up after the first couple of runs of the application. There is no special stuff that is happening, simply that the application inserts several existing drawings into the current one based on inputs provided by the user, as part of the drawing generation process. No custom entities, no other complications.

Hope someone gets a bright idea of why this is happening. I dont have any hair left to tear! 😞
0 Likes