ObjectARX Mac Development Demo (Video)
Simple Cocoa Example with ObjectARX (Video)
BEGIN
<<
Before get started, there are some points we should know:
- DBX module should be .dylib type;
- ARX module should be .bundle/.framework type, while extension name should be ".bundle";
- ARX module only works on 64bit;
***** Steps to create a Hello World ARX from Autodesk template *****
***** Steps to create a Hello World ARX from Cocoa template *****
void mycmd()
{
acutPrintf(L"Hello world.");
}
#define COMMAND_GROUPNAME L"MYARX_COMMANDS"
#define COMMAND_NAME L"mycmd"
// all ARX apps must define this entry point
extern "C" AcRx::AppRetCode
acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
{
switch (msg)
{
case AcRx::kInitAppMsg:
acrxDynamicLinker->unlockApplication(pkt);
acrxRegisterAppMDIAware(pkt);
acedRegCmds->addCommand(COMMAND_GROUPNAME,
COMMAND_NAME, COMMAND_NAME,
ACRX_CMD_TRANSPARENT,
&mycmd);
break;
case AcRx::kUnloadAppMsg:
acedRegCmds->removeGroup(COMMAND_GROUPNAME);
break;
default:
break;
}
return AcRx::kRetOK;
}
>>
END
Discussion of programming model differences here:
LP64
wchar_t
Use the Adesk types.