ObjectARX: Unable to load my COM created menu.

ObjectARX: Unable to load my COM created menu.

Anonymous
Not applicable
221 Views
1 Reply
Message 1 of 2

ObjectARX: Unable to load my COM created menu.

Anonymous
Not applicable
Hi there!

I create a menu trough COM when my application is loaded. In the
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt) function in the
AcRx::kInitAppMsg: case, but AutoCAD does not let me
if
(SUCCEEDED(pAcadDisp->QueryInterface(IID_IAcadApplication,(void**)&pAcad)))
to get the IAcadApplication pointer so I can't load my menu when the
registry contains all the setting (LOADCTRLS:REG_DWORD:0x2) to automatically
load my application on AutoCAD startup. I commanted out my menu function
and it loads correctly. I tried to load the sample polysamp application
provited with the ObjectARX CD in the same way but it does the same thing.
Is their another way to go arround this problem. I still want to use the
COM interface.
0 Likes
222 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Without testing this out some, my recollection is that you won't be able to
do this when you're initializing the application. And especially when
AutoCAD is first starting up. You have to wait until everything completely
finishes loading to be able to load your menu.

What you can do is use a lisp routine that creates a linker reactor keyed to
your ARX. When the reactor fires because your ARX application is loaded,
then you will be able to load or construct a menu via lisp ActiveX methods.

There should be a support document that details this procedure. But I was
unable to find it on the PointA site. Maybe you'll have better luck than I.

> I create a menu trough COM when my application is loaded. In the

> if
>
(SUCCEEDED(pAcadDisp->QueryInterface(IID_IAcadApplication,(void**)&pAcad)))
> to get the IAcadApplication pointer so I can't load my menu when the
> registry contains all the setting (LOADCTRLS:REG_DWORD:0x2) to
automatically
> load my application on AutoCAD startup. I commanted out my menu function
0 Likes