Porting an ObjectARX application to nanoCAD

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:

  1. 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:
    Start_NrxG_Migr_1

  2. 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:
    Start_NrxG_Migr_2

  3. 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

    Start_NrxG_Migr_3
    Note, the directories must be added in the right order to avoid compiling errors.

  4. In the C/C++ > Code Generation section choose the Multi-threaded DLL option for the Runtime Library property.
    Start_NrxG_Migr_5

  5. In the Linker > General section add paths to the nanoCAD SDK libraries:
    [nanoCAD SDK path]\lib
    [nanoCAD SDK path]\lib\TD

    Start_NrxG_Migr_6

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.

One thought on “Porting an ObjectARX application to nanoCAD

  1. Pingback: Porting C++ applications to nanoCAD: using project property pages | nanoCAD API Blog

Leave a Reply