< Home

< Reference Manual

< Supported File Formats

PROGRAMMING GUIDE

Contents

Programming with Exchange

Working with the Exchange API

Parsing a PRC File

Creating a PRC file that uses boundary representation

Creating a tessellation entity for representing faceted objects

Initializing HOOPS Exchange

You must first initialize the HOOPS Exchange libraries before making any function calls. This is a three step process:

Step 1: Loading the libraries

To minimize memory, HOOPS Exchange explicit loads libraries only as needed. This requires you to make the following function calls to load the Exchange DLLs:

#ifdef _WIN64
const TCHAR *pcLibPath=_T("..\\..\\..\\..\\bin\\win64\\");
#else
const TCHAR *pcLibPath=_T("..\\..\\..\\..\\bin\\win32\\");
#endif

if (!A3DSDKLoadLibrary(pcLibPath))
{
   printf("Failed to load A3DLIBS.dll!");
   return false;
}

Step 2: Licensing the libraries

You must get a new license key for HOOPS Exchange v5.0.

After loading the libraries, you need to register your license. You can get license keys from the release download page on the Developer Zone. You should copy these keys into the A3DSDKLicenseKey.h file and then make the following API call:

A3DLicPutLicense(A3DLicPutLicenseFile, pcCustomerKey, pcVariableKey);
Evaluation keys are not suitable for release software. Evaluation keys are all time bound and Exchange will fail after the evaluation end date. It is important that you get a new license key for your application once you license HOOPS Exchange.

Step 3: Initializing the libraries

Verify that your application is compatible the Exchange libraries by comparing the version of the libraries that you compiled with and the version of the libraries that was loaded. Obtain the version identifiers for the currently installed HOOPS Exchange Library by invoking the A3DDllGetVersion function. Evaluate the returned values as follows:

Initialize the Exchange API using these version identifiers.

if (A3DDllInitialize(A3D_DLL_MAJORVERSION, A3D_DLL_MINORVERSION) != A3D_SUCCESS)
{
	A3DSDKUnloadLibrary();
	return false;
}