In this post we describe how to migrate an existing ObjectARX application to nanoCAD.
This post is part of nanoCAD SDK Documentation that can be downloaded from the nanoCAD Developers’ Club.
To migrate an existing ObjectARX project to NRX:
- ObjectARX projects typically contain two project configurations: Debug and Release. Open the project in Visual Studio and create additional configurations that will be used for compiling the application for nanoCAD. For example, Debug NCAD:
- In the General section of the project Configuration Properties set the property Character Set to the value Use Unicode Character Set and the property Use of MFC to the value Use MFC in a Shared DLL:
- Go the C/C++ > General section and specify nanoCAD SDK header files directories in the following order:
[nanoCAD SDK path]\include
[nanoCAD SDK path]\include\TD
[nanoCAD SDK path]\include\MAPI
[nanoCAD SDK path]\include\arxgate
Note, the directories must be added in the right order to avoid compiling errors. - In the C/C++ > Code Generation section choose the Multi-threaded DLL option for the Runtime Library property.
- In the Linker > General section add paths to the nanoCAD SDK libraries:
[nanoCAD SDK path]\lib
[nanoCAD SDK path]\lib\TD
Now it is possible to build the project, load the generated application DLL into nanoCAD with APPLOAD command and launch the application by running one of its commands.
For a complete sample project please look at the samples\NRX\CrossCircle SDK folder. This sample contains a custom entity, its managed wrapper, and commands written with both C++ and .NET.
The nanoCAD SDK is available in the nanoCAD Developers’ Club.