Developer's Guide > Get Started with Civil SDK > Activating ODA Software
Activating ODA Products

This section explains ODA Software activation, the activation procedure, and how to maintain custom applications that use activated ODA products.

What is ODA Software Activation

ODA Software activation is a mechanism for checking whether a licensed member uses ODA products.

With an ODA subscription, you get unique member activation information. All ODA products require unique member activation information for proper initialization and to provide supported functionality for creating custom applications.

ODA activation information includes:

  • A MemberID string that is generated from member credential information and uniquely identifies a member.
  • A digital signature created using an ODA private key that is not available even within ODA sources.

Note: ODA activation data is renewed at the beginning of every year, therefore you have to update your activation files while upgrading ODA SDKs released that year. Otherwise ODA Software initialization fails with an exception.

How to Get ODA Activation Information

To obtain activation information:

  1. Follow the activation link https://account.opendesign.com/activation at the ODA official website and log in if required:

    Login form
  2. After login, choose the required release, choose C++ as API language and click the Generate button to generate the activation file.

    Activation Page
  3. Your browser prompts you to download the OdActivationInfo file which contains the activation information.

    Save this file in a directory that is available via the INCLUDE_PATH variable of your custom application project, for example, the ThirdParty/activation subfolder of the ODA Platform installation directory.

How to Use ODA Activation Information when Building ODA Samples or Developing a Custom C++ Application

C++ custom applications need to call the odInitialize() function to get access to ODA API functionality. While running the odInitialize() function, the activation name and signature from the activation information file are validated. ODA APIs throw the OdError "Not activated!" exception if validation fails.

If a system services object that you pass to the odInitialize() function is inherited from the ExSystemServices class, place the OdActivationInfo file in a directory that has been added to the INCLUDE_PATH variable. In this case your compiler will be able to access the OdActivationInfo file during the build process. For example, you can place your OdActivationInfo file in the ThirdParty/activation directory of the ODA Platform folder and add this path to your project's INCLUDE_PATH values.

If you don't have the ODA activation file, see the How to Get ODA Activation Information section in this document for detailed information about getting the activation file.

If the activation file is placed in a location that your compiler cannot access, you will get a compiler error such as "Kernel/Extensions/ExServices/ExSystemServices.h:43:10: fatal error: 'OdActivationInfo' file not found".

If a system services object that you pass to the odInitialize() function is not inherited from the ExSystemServices class, call the odActivate() function explicitly and pass to it the MemberID and digital signature from your OdActivationInfo file. The odActivate() function should be called before calling the odInitialize() function. Please see the code fragment below that illustrates this approach.


      class MyServices : public ExHostAppServices, RxSystemServicesImpl //class MyServices is NOT inherited from ExSystemServices class.
      {
      ...
      };

      ...

      //Create an instance of MyServices
      OdStaticRxObject<MyServices> svcs;

      //Call odActivate
      // odActivate("First string from your OdActivationInfo file", "Second string from your OdActivationInfo file");
      //Or better like below. Upgrading to new version requires new OdActivationInfo file. No code editing will be required.
      odActivate(
       #include "OdActivationInfo"
       );
      ...

      //Only after calling odActivate call OdInitialize
      odInitialize(&svcs);

      ...
     

Before ending the execution of your application, it is recommended to call the odCleanUpStaticData() function to unload the MemberID and the digital signature. Also, if you are using ODA SDKs, uninitialize them with corresponding call to the uninitialization functions. For example, to uninitialize Visualize SDK and deactivate ODA:


void ODASdkDeactivate()
{
  odCleanUpStaticData();
}

...

// Uninitialize the ODA Visualize SDK
odTvUninitialize();

ODASdkDeactivate();

Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.