Announcements
Due to scheduled maintenance, the Autodesk Community will be inaccessible from 10:00PM PDT on Oct 16th for approximately 1 hour. We appreciate your patience during this time.
ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Class parent named ‘AcDbRasterImage’ not found

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
Anonymous
1282 Views, 5 Replies

Class parent named ‘AcDbRasterImage’ not found

I want to create a custom entity named "ADSKStamp" derived from AcDbRasterImage, but when I load the arx, I got the error "Class ADSKStamp parent named ‘AcDbRasterImage’ not found" from autocad. I had already add the recommended code in init code, as below

virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
acrxDynamicLinker->loadModule(L"acismobj24.dbx", true);

ADSKStamp::rxInit();
acrxBuildClassHierarchy();
return (retCode) ;
}

 

What can I do to define a custom entity which can take some my own properties and can correctlly show a picture on the autocad drawing?

 

5 REPLIES 5
Message 2 of 6
autodaug
in reply to: Anonymous

Hi, that code looks correct.  Can you verify that the acismobj24.dbx file is on the disk in the same location as acad.exe?

If you're using an older version of AutoCAD, the "24" in the filename may be replaced by "23" or something lower.

As a test, you could also try to force the imaging apps to be loaded by issuing the "imageAttach" command in AutoCAD.  That should force loading of the dbx file and then it won't matter if your app loads it or not.

 

Message 3 of 6
Anonymous
in reply to: autodaug

I can find acismobj24.dbx in the same location as acad.exe, after I use "imageAttach" command in AutoCAD, I can correctlly load arx, but how can I solve this problem in code?

Message 4 of 6
autodaug
in reply to: Anonymous

Okay, so it sounds like your loadModule() call is either not being executed, or it is failing.  Can you check to see if that call happens and does it return true?  I suspect it is failing and returning false.  Then during your call to acrxBuildClassHierarchy(), the parent class is not found, causing the error.

I don't know why the loadModule() would fail, if the file is there and AutoCAD is able to load it.  If you're familiar with the ProcMon utility, you could use that to watch for FileSystem events involving the dbx's filename.  I can guide you through that if you want to try it..

 

 

Message 5 of 6
Anonymous
in reply to: autodaug

Thank you! I found the reason now, I should put "acrxDynamicLinker->loadModule(L"acismobj24.dbx", true);" before "AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt);", if I put it after the "AcRxArxApp::On_kInitAppMsg (pkt);",the error will reported to autocad before I load the dbx.

Message 6 of 6
autodaug
in reply to: Anonymous

Well, I'm glad it's working for you, but I'm not sure you should have to change the order of calls like that.

One thing I just realized is that your code is for an enabler (dbx app), not an arx app.  In that case, I think it should call the On_kInitAppMsg() method of the AcRxDbxApp class, not AcRxArxApp.  Maybe give that a try?

 

 

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report