Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
After upgrading my application to use the ObjectArx 2021 libraries, my .net wrapper classes for my custom entities are no longer working. It is as if the acrxEntryPoint is being completely ignored. I have the following code in my c++/cli .net wrapper project:
#include "stdafx.h"
#include <gcroot.h>
#include <vcclr.h>
#include "mgdinterop.h"
#include "rxregsvc.h"
#include "includes.h"
#define szRDS _RXST("Adsk")
... Usings left out for brevity
/// ------------------------------------------------------------------------
static AcMgObjectFactoryBase** g_PEs = nullptr;
static void* g_moduleHandle = nullptr;
void InitModule()
{
// Maps the entities to the .net Wrappers.
static AcMgObjectFactoryBase* PEs[] =
{
new AcMgObjectFactory<TPG_ObjectMgd, TPG_Object>(),
new AcMgObjectFactory<TPG_ProjectMgd, TPG_Project>(),
....
nullptr
};
g_PEs = PEs;
}
class ManagedArxApplication : public AcRxArxApp
{
public:
ManagedArxApplication() : AcRxArxApp() {}
virtual AcRx::AppRetCode On_kInitAppMsg(void* pkt)
{
AcRx::AppRetCode retCode = AcRxDbxApp::On_kInitAppMsg(pkt);
InitModule();
return (retCode);
}
virtual AcRx::AppRetCode On_kUnloadAppMsg(void* pkt)
{
int i = 0;
while (g_PEs[i] != NULL)
delete g_PEs[i++];
AcRx::AppRetCode retCode = AcRxDbxApp::On_kUnloadAppMsg(pkt);
return (retCode);
}
virtual void RegisterServerComponents()
{}
};
IMPLEMENT_ARX_ENTRYPOINT(ManagedArxApplication);
In my .net application, I have implemented the IExtensionApplication interface and in the Initialize() method I have the following two lines of code which I would expect to invoke the entry point for the managed wrappers:
RXClass rxc = TPG_ProjectMgd.GetClass(typeof(TPG_ProjectMgd));
Application.ShowAlertDialog(rxc.Name);
I can break at the above code, but placing a breakpoint On_kInitAppMsg(...) in the previous code block is never hit. This all works in my 2019 project. Any ideas?
Mike
Solved! Go to Solution.