Creating a new project for NRX application

In this post we describe how to create a new project for NRX (nanoCAD runtime extension) applications.  NRX is a classical C++ API, compatible with ObjectARX, that allows the user to extend nanoCAD functionality.

This post is part of nanoCAD SDK Documentation that can be downloaded from the nanoCAD Developers’ Club.

To create a new NRX project:

  1. Create a new C++ project in Microsoft Visual Studio 2008 (Win32 Project):Start_NrxG_NewPrj_1
  2. Set the project name and its location:

  3. Choose DLL as an application type and add common header files for MFC:Start_NrxG_NewPrj_21
  4. 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:

  5. Go to the C/C++ > General section and specify nanoCAD SDK header file directories in the following order:
    [nanoCAD SDK path]\include
    [nanoCAD SDK path]\include\TD
    [nanoCAD SDK path]\include\MAPI
    [nanoCAD SDK path]\include\nrxgate

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

  6. In the C/C++ > Codegeneration section choose the Multi-threaded DLL option for the Runtime Library property.

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


  8. Add the following line to include the essential NRX header files:
  9. Add the following code to define an entry point:
  10. Implement the initApp() function that register all commands for the application:
  11. Implement the uninitApp() function that unloads application commands. In practice, a whole command group is unloaded, not only a separate command:

Leave a Reply