Hide menu

Supported Programming Languages

CAD Exchanger SDK supports C++, C#, Python and Java programming languages. The SDK itself is written in C++ and public API for other languages is implemented via language bindings which underneath invoke C++ implementation.

The User's Guide provide documentation for C++ and C# API. Usage for Python and Java can be derived from those. Java and Python examples can be used as a starting point for API exploration in these languages.

C++ Support

When developing C++ applications make sure you select CAD Exchanger SDK libraries corresponding to the C++ compiler version which you use. Refer to the Visual Studio versions section for mapping between Visual Studio version and subfolder name in the SDK package.

C# Support

C# libraries are located in the ./csharp subfolder.

C# API is mostly aligned with C++ API. Exceptions to this rule include operators (which can't be overloaded) and setters (their names begin with Set instead of matching getters' names). C# assemblies are located in .dll's having a 'Net' suffix, for instance, CadExIGESNet.dll or CadExCoreNet.dll.

C# libraries are built using .NET Framework 3.5 what improves interoperability across Windows and .NET versions. User's applications can be built to target .NET Framework 3.5 or newer versions.

Java Support

Java libraries are located in the ./java subfolder.

Java API is mostly aligned with C++ API. Exceptions are the same as for the C# API.

When developing Java applications, in addition to Java libraries you will have to use native C++ libraries. If you already use other C++ libraries in your application you are recommended to use C++ SDK libraries consistent with your C++ compiler (i.e. vc14, vc12, etc). If you do not use any other C++ libraries then you are recommended to use C++ libraries corresponding to the latest supported C++ compiler version (e.g. vc14.1 on Windows).

Python Support

Python version of CAD Exchanger SDK can be installed from a private pip repository with the following command:

python -m pip install cadexchanger --extra-index-url=<repo link goes here>

To get a download link, request an evaluation.

Python API is mostly aligned with C++ API. Differences between Python API and C++:

  • Nested classes are not supported, so they are linearized and have the parent class name appended to their names, for example 'ModelData_Model::ElementVisitor -> ModelData_Model_ElementVisitor'
  • Iterators and List classes support the Python iterator interface.
  • Some functions that return values via function parameters return them normally in Python (using tuples if multiple return values are required).
  • Classes that support iterators now have GetIterator methods.

General Conventions

Single namespace All C++ and C# classes are defined in the cadex namespace, Java classes - in cadex package, Python classes - in the namespaces of their modules
C++ header file naming

Each C++ API class is defined in a header file with the same name and located in the cadex subdirectory. Thus, for instance, the header file for an IGES reader should be included as follows:

#include <cadex/IGES_Reader.hxx>
Format naming Classes that relate to a specific format have a prefix corresponding to that format (e.g. STEP_, JT_).
Converter naming Classes that perform import of CAD files (i.e. parsing and converting them into CAD Exchanger data model) have a suffix Reader (e.g. ACIS_Reader, JT_Reader), those which perform export (i.e. converting from CAD Exchanger data model and saving to a file) have a suffix Writer (e.g. STEP_Writer, Para_Writer).
Data model classes naming Classes related to CAD Exchanger data model have a prefix ModelData_ (e.g. ModelData_Part, ModelData_Body).

Release and Debug Libraries

For Windows C++ libraries are provided for release and debug modes. The debug libraries have suffix 'd' in their names (e.g. CadExIGESd.lib) and are located in the ./bind and ./libd subdirectories. For other operating systems only a single set of C++ libraries is provided, which can be used both in release and debug builds.

C# libraries (e.g. CadExCoreNet.dll) and Python modules (e.g. CadExCore.py and _CadExCore.pyd) are linked to C++ libraries in release mode.

Java libraries (e.g. CadExCoreJava.jar) themselves have no explicit linking to the C++ libraries. Dependent native C++ libraries have to be specified inside Java code to be loaded at runtime. Loading a library is done as follows:


Library linking

Using a converter from the CAD Exchanger SDK (such as IGES, Parasolid or JT converter) requires linking with a corresponding library. The name of the library can be easily derived from the format name. For instance, to add support of JT the following libraries have to be linked (for release mode):

  • C++: CadExJT.lib;
  • C#: CadExJTNet.dll;
  • Java: CadExJT.jar;
  • Python: CadExJT.py.

On Windows linking with SDK C++ import libraries (.lib) is done automatically when including a respective header file. For instance, including JT_Reader.hxx will automatically link with CadExJT.lib (in release mode) or CadExJTd.lib (in debug mode). This allows to avoid explicit linking (e.g. via Visual Studio project settings).

On other platforms you may need to explicitly link to the SDK libraries.

Visual Studio versions

The following table below provides mapping between Visual Studio versions and respective subdirectories in the package:

Visual Studio versionSubfolder name
2019 vc14.2
2017 vc14.1
2015 vc14
2013 vc12
2012 vc11

Libraries folders

Release and debug libraries are located in the following subfolders:

ContentsDebug modeRelease mode
Dynamic libraries on Windows (*.dll)bindbin
Import libraries (*.lib; Windows/C++ only)libdlib
Dynamic libraries on Linux, Android (*.so) or MacOS (*.dylib)lib

32-bit and 64-bit architectures have respective suffix in the subfolders names (e.g. win32, lin64, mac64, etc).

Reads IGES files.
Definition: IGES_Reader.hxx:28