< 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 simple, three step process that involves the following steps:

Step 1: Loading the libraries:

To minimize memory, HOOPS Exchange explicit loads libraries. 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;
}
	
A3DPRCUnloadLibrary()

Step 2: Licensing the libraries:

After loading the libraries, you should register your Customer and Variable keys. You can get license keys from the release download page on the Developer Zone. You must get a new license key after licensing HOOPS Exchange. You should copy these keys into

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.

Step 3: Initializing the libraries

The final step before translation is to intialize the Exchange libaries to reguster the functions:

	
A3DInt32 iMajorVersion=5,iMinorVersion=0;
A3DDllGetVersion(&iMajorVersion,&iMinorVersion);

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

The final step before translation is to intialize the Exchange libaries to register the functions.