Hide menu
Essentials

Supported Programming Languages

CAD Exchanger SDK supports C++, C# 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++ API. Usage for other languages can be easily derived. Available C# and Java examples can be used as a starting point.

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

General Conventions

Single namespace All C++, C# and Java classes are defined in the cadex namespace
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) 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:

System.loadLibrary("CadExSTEP");

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: CadExJava.jar.

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
2017 vc14.1
2015 vc14
2013 vc12
2012 vc11

Libraries

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