# 1. Set Up Your Environment

This documentation provides step-by-step instructions for setting up your environment for developing with the HOOPS Exchange C# API.

The process includes installing a development environment, downloading and extracting the library package, obtaining and configuring the license, and testing the installation using sample code.

If you already followed the instructions for installing the C/C++ development environment, you can skip most of the sections in this document and directly jump to download the C# package then instaling the license.

## 1.1. Installing Your Development Environment

Developing applications with HOOPS Exchange for Windows is typically done using the Visual Studio Integrated Development Environment (IDE).

To get started, visit the Microsoft Visual Studio download page and choose the edition of Visual Studio that suits your needs. Be mindful that your chosen compiler adheres to the HOOPS Exchange platform requirements.

During the installation process, select the Console Application component set.

Configure Linux:

- Go to the required components page.
- Make sure that your Minimum supported OS and compiler are compatible with HOOPS Exchange.

Configure macOS:

- Go to the required components page.
- Make sure that your Minimum supported OS and compiler are compatible with HOOPS Exchange.

## 1.2. Installing HOOPS Exchange

1. Getting HOOPS Exchange:

   If this is your first visit to our website, and neither you nor your company has ever used or licensed our products before:

   > - Go to our User Dashboard page and click the Sign Up link.

   > - Create your self-evaluation account. You will be emailed a link to verify your account details.

   > - Once you’ve verified your account, click on Product Downloads and then Download HOOPS Exchange to be taken to the Developer Zone.

   > - Lastly, click the Download button for your chosen operating system.

   If you are on a Windows or Linux platform, you may download the installer or the ZIP file. macOS users must use the ZIP file. To download the iOS or Android package, please Contact Us.

   Read the Package Description page for more information about the download package content.

   > - Installer: Run the installer and follow the instructions to install the package on your local machine.
   > - ZIP file: Locate the downloaded package file, which is a zip archive.

   You can use either a built-in extractor or third-party software to extract the contents to your chosen destination folder.

2. Additional C# Library:

   C# support in HOOPS Exchange is optional and is delivered by a separate API library. Download this library from the Developer Zone.

   It is located under Products → HOOPS Exchange → Related Technologies → HOOPS Exchange C# API.

   The package is delivered in the form of a .zip file. Unzip this package into the root directory of your HOOPS Exchange installation from the previous step.

3. Obtaining and setting the license:

   Before you can use this product, you must have a valid HOOPS Exchange license key. The keys are usually compiled into the application as part of a header file. The license can be acquired in two ways: it can be obtained as a string from the Developer Zone downloads page, or embedded in a preconfigured header file.

   > - The generated key is permanent and accessible from the Developer Zone at any time during your evaluation.

   If you are using the installer, you’ll be required to input the license key to complete installation of the SDK.

   If you are using the ZIP file, you will need to copy and paste your new license key into the license header file available in your installation folder:

   > - Locate the folder where you have previously extracted HOOPS Exchange on your system.

   > - Navigate to the include directory.

   > - Either replace hoops_license.cpp with the preconfigured header file downloaded from the Developer Zone, or edit the existing file include/hoops_license.cpp and enter your new license key in the `KEY` string.

   > - If you are planing to develop in C#, you’ll also need to download the hoops_license.cs header or enter the license manually in hoops_license.cs. The file should be copied to <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/ExchangeCSharp/.

   From the Developer Zone, clicking Active Evaluations at the top right of the page and then License Key will give you access to your license status.

   HOOPS Exchange only requires a new license key if you are currently using a key which was generated for a prior major version. For example, developers upgrading from HE 2024.6.0 to HE 2024.7.0 may use the same key, but those upgrading from 2024.0.0 to 2025.0.0 need to generate a new key.

   The expiration date for the generated license key is tied to your contract with Tech Soft 3D. If you have signed a license agreement for HOOPS Exchange, then the license key that is generated will be a perpetual (non-expiring) license key. If you are evaluating HOOPS Exchange, then the license key will expire when your evaluation expires. Evaluation license keys will expire at the end of the evaluation period and are not suitable for production software. Any software that uses an evaluation license key will no longer work after the evaluation period.

   HOOPS Exchange releases are not binary compatible with older releases. You must recompile your application when updating to a new version of HOOPS Exchange. Please see Distributing Your Application section for an up-to-date list of binaries required for distribution.

1. Getting HOOPS Exchange:

   Your company is already evaluating or licensing one of our products, go to the Developer Zone.

   At the top right of the page, click on the Sign In button:

   > - If you have an existing account, simply enter your credentials.

   > - If your company is already licensing our technology, please contact us.

   > - After our team has attached your contact to your company records, you will receive a personal invitation to log in.

   From here, you can download:

   > - Your license file (perpetual and evaluation license key).
   > - ZIP files of current and previous versions for Windows, Linux, macOS, iOS, Android platforms.
   > - “From the Vault” Importers for the no longer supported formats: HSF, OneSpace Designer, KMZ, Lattice XVL and CADDS.
   > - All of our other HOOPS, Ceetron, Partners, and OEM CAD technologies and viewers.

   Read the Package Description page for more information about the download package content.

   > - ZIP file: Locate the downloaded package file, which is a zip archive.

   You can use either a built-in extractor or third-party software to extract the contents to your chosen destination folder.

2. Obtaining and setting the license:

   Existing partners can download ZIP files and their license file from the Developer Zone:

   > - Visit the Developer Zone and click the View License Keys button.

   > - Click the C Header button in the Header Files section.

   This will generate a file named hoops_license.h for you. Once done, simply:

   > - Download the license file

   > - Locate the folder where you have previously extracted HOOPS Exchange on your system.

   > - Navigate to the <HOOPS_EXCHANGE_INSTALL_DIR>/include/ directory.

   > - Copy the downloaded hoops_license.h and replace the default one in the include directory.

   If you’re planning to use the C# API, you’ll also need to download the C# version of the header and copy it to <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/ExchangeCSharp/hoops_license.cs.

   HOOPS Exchange only requires a new license key if you are currently using a key which was generated for a prior major version. For example, developers upgrading from HE 2024.0.0 to HE 2024.1.0 may use the same key, but those upgrading from 2023.0.0 to 2024.0.0 need to generate a new key.

   The expiration date for the generated license key is tied to your contract with Tech Soft 3D. If you have signed a license agreement for HOOPS Exchange, then the license key that is generated will be a perpetual (non-expiring) license key. If you are evaluating HOOPS Exchange, then the license key will expire when your evaluation expires. Evaluation license keys will expire at the end of the evaluation period and are not suitable for production software. Any software that uses an evaluation license key will no longer work after the evaluation period.

   HOOPS Exchange releases are not binary compatible with older releases. You must recompile your application when updating to a new version of HOOPS Exchange. Please see Distributing Your Application section for an up-to-date list of binaries required for distribution.

## 1.3. Testing the Installation

Now that you’ve completed the setup, it’s time to test the installation using sample code provided with HOOPS Exchange.

Locate the folder where you have previously extracted HOOPS Exchange on your system and navigate to the samples directory:

1. Build the solution

   If you are on a Windows platform:

   - Open <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/samples/HOOPSExchangeSamples.sln file using Visual Studio.
   - Select the Debug, x64 mode.
   - Go to the tab Build and build the entire solution.

   Important

   The HOOPSExchangeSamples.sln file is preconfigured to work with the C# library you unzipped in your HOOPS Exchange installation folder. When you are building an application from scratch, you’ll need to add a reference to your project in order for the HOOPS Exchange C# API to work. The reference is <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/ExchangeCSharp/bin/Debug/netcoreapp3.1/ExchangeCSharp.dll.

   However, this file is not distributed with the package. It is built as you compile the samples solution.

2. Test a sample

   From the Solution Tree explorer in Visual Studio:

   > - Locate the sample ImportExport.
   > - To run the sample, right click on it and select Debug -> Start New Instance.
   >     - The sample will read a sample input file, _Aquo Bottle.CATProduct, and convert it to PRC format.
   >     - The result file is located alongside the input file.
   > - Locate the newly created file _Aquo Bottle.CATProduct.prc in your output folder from the installation folder ..samplesdatacatiaV5CV5_Aquo_Bottle
   > - Open the HOOPS Demo Viewer desktop application.
   > - Drag and drop your resulting _Aquo Bottle.CATProduct.prc file to quickly visualize the assembly:

   For more details on using the HOOPS Demo Viewer, consult the HDV Documentation Page.

1. Build the solution

   If you are on a Linux platform:
     - Locate the folder samples from the installation folder.
     - Right click on the folder and select Open in Terminal.
     - In your terminal, type `make` to build all the samples.

   Out of the box, all samples are built except the sample TranslateToPkParts, which is our Bridge to the Siemens Parasolid API. This requires more configuration to run - please visit the TranslateToPkParts page for more details.

   Note

   The HOOPS Exchange samples are preconfigured to work with the C# library you unzipped in your HOOPS Exchange installation folder. If you are building an application from scratch, you’ll need to add a reference to your project in order for the HOOPS Exchange C# API to work. The reference is <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/ExchangeCSharp/bin/Debug/netcoreapp3.1/ExchangeCSharp.so.

   However, this file is not distributed with the package. It is built as you compile the samples solution.

2. Test a sample

   The HOOPS Demo Viewer application being a Windows only application, for Linux we will use the samples `ImportExport` AND `Viewer` instead.

   > - Locate the sample `ImportExport` from the installation folder `../samples/hello_world/ImportExport`
   > - Right click on the folder and select Open in Terminal.
   > - Locate the file _Aquo Bottle.CATProduct from the installation folder `../samples/data/catiaV5/`
   > - Make sure the sample is already built otherwise build it again: Command Line: `make`

   - Run the sample `ImportExport` to convert a CATIA V5 assembly called _Aquo Bottle.CATProduct to PRC format.
   - Command Line : `./ImportExport ../samples/data/catiaV5/_Aquo Bottle.CATProduct ../samples/data/catiaV5/_Aquo Bottle.CATProduct.prc`
   - Locate the resulting file _Aquo Bottle.CATProduct.prc from the installation folder `../samples/data/catiaV5/`
   - Run the sample `Viewer` to load the PRC file in the OpenGL sample Viewer. Command Line `./Viewer ../samples/data/catiaV5/_Aquo Bottle.CATProduct.prc`
   - _Aquo Bottle.CATProduct.prc file will be displayed in an OpenGL Windows:

1. Build the solution

   If you are on a macOS platform:
     - Locate the folder `../samples/` from the installation folder.
     - Open the Terminal and set the current directory to `../Samples`
     - In Terminal Type `make`

   Out of the box, all samples are built but the sample `TranslateToPkParts`, our Bridge to the Siemens Parasolid API requires further more configuration to run, please visit the TranslateToPkParts page for more details.

   Note

   The HOOPS Exchange samples are preconfigured to work with the C# library you unzipped in your HOOPS Exchange installation folder. If you are building an application from scratch, you’ll need to add a reference to your project in order for the HOOPS Exchange C# API to work. The reference is <HOOPS_EXCHANGE_INSTALL_DIR>/csharp/ExchangeCSharp/bin/Debug/netcoreapp3.1/ExchangeCSharp.so.

   However, this file is not distributed with the package. It is built as you compile the samples solution.

2. Test a sample

   The HOOPS Demo Viewer application being a Windows only application, for macOS we will use the samples `ImportExport` AND `Viewer` (C/C++) instead.

   > - Locate the sample `ImportExport` from the installation folder `../samples/hello_world/ImportExport`
   > - Open the Terminal and set the working directory to `../samples/hello_world/ImportExport`
   > - Make sure the sample is already built. If not built, you can build it using make from your command line.

   - On macOS go to System Settings and open the Privacy and Security tab.
   - Check that the `libA3DLIBS-xx.x.xx.dylib` file is not blocked - if this is the case click Allow Anyway.
   - Locate the file _Aquo Bottle.CATProduct from the installation folder `../samples/data/catiaV5/`
   - Run the sample `ImportExport` to convert a CATIA V5 assembly called _Aquo Bottle.CATProduct to PRC format.
   - Command Line: `./ImportExport ../samples/data/catiaV5/_Aquo Bottle.CATProduct ../samples/data/catiaV5/_Aquo Bottle.CATProduct.prc`
   - Locate the resulting file _Aquo Bottle.CATProduct.prc from the installation folder `../samples/data/catiaV5/`
   - Run the sample `Viewer` to load the PRC file in the OpenGL sample Viewer. Command Line `./Viewer ../samples/data/catiaV5/_Aquo Bottle.CATProduct.prc`
   - _Aquo Bottle.CATProduct.prc file will be displayed in an OpenGL Windows:

## 1.4. Conclusion

You have successfully set up your environment for HOOPS Exchange, including Visual Studio installation, package download and extraction, license configuration, and testing using sample code.

You are now ready to start working with HOOPS Exchange. If you encounter any issues or have questions, please refer to our support resources or forum.

You are now ready for our next tutorial: File-to-File Translation.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Exchange in your own language, or choose a sample question below to start a conversation:

What is HOOPS Exchange?
What are the latest release notes for HOOPS Exchange?
How do I start evaluating HOOPS Exchange?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...