ObjectARX

ObjectARX

Reply
Valued Contributor
jason.teagle
Posts: 64
Registered: ‎06-22-2010
Message 1 of 2 (145 Views)
Accepted Solution

COM Wrapper Created But No Categories / Properties Showing

145 Views, 1 Replies
09-19-2011 01:20 AM

I am trying to create a sample project for another problem I have posted on here for recently, but I am unable to get the COM wrapper working correctly. The object itself is fine and shows on the drawing when created. The COM wrapper object *does* get constructed, and does *not* get dumped until I deselect the object (confirmed with breakpoints on FinalConstruct() and FinalRelease() ). It does not, however, ever call any methods within the CPP file such as GetCategoryName(), GetDisplayName(), etc. It has one category (a custom one) with one property in it.

 

If I try to use the object from VBA (as advised on another post about a COM wrapper not showing anything) I *can* create the object with CreateObject() and it is valid (rather than Nothing) - but if I try to call its one custom method or GetDisplayName() VBA comes up with

 

Run-time error '-2147319765 (8002802b)':

 

Automation error
Element not found.

The Visual Studio 2008 solution with the test object (DBX) and ARX for the wrapper class is attached (you will need to correct the include paths to suit your environment and do a full build).

 

Can anyone help figure out what I've missed / done wrong?

 

 

The problem was that the .tlb file generated from the ARX's .idl file was not being included in the resources (RC) file. I had removed it because a project created straight from scratch (the ARX Wizards) doesnot compile due to the .tlb file it automatically places in the RC file not being on a known path.

 

 

Valued Contributor
jason.teagle
Posts: 64
Registered: ‎06-22-2010
Message 2 of 2 (92 Views)

Re: COM Wrapper Created But No Categories / Properties Showing

08-08-2012 04:52 AM in reply to: jason.teagle

The problem was that the .tlb file generated from the ARX's .idl file was not being included in the resources (RC) file. I had removed it because a project created straight from scratch (the ARX Wizards) doesnot compile due to the .tlb file it automatically places in the RC file not being on a known path.

 

 

Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.