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.

../../_images/console-application.png

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.

      ../../_images/user-dashboard.png
    • 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.

      ../../_images/download-links.png
    • Lastly, click the Download button for your chosen operating system.

      ../../_images/download-exchange.png

    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.

    ../../_images/download-installers-zip.png

    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.

      ../../_images/HE-License-Key.png

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

      ../../_images/Enter-the-Key-cs.png

    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.

    ../../_images/dz-main-screen.png

    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.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/exchange.sln file using Visual Studio.
    • Select the Debug, x64 mode.
    • Go to the tab Build and build the entire solution.
    ../../_images/vs-build-solution-cs.png

    Important

    The exchange.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:
    ../../_images/AquaBottle.png

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

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.