Set Up Your Environment

This documentation provides step-by-step instructions for setting up your environment for developing with HOOPS Access using C or C++.

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

Installing Your Developer Environment

Developing applications with HOOPS Access 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. During the installation process, make sure to select at least the Desktop development with C++ component set.

../_images/setup-env-vs-components.png

Additionally, verify that your installed compiler adheres to the Platform Requirements.

After completing the installation, restart your computer to ensure that all changes take effect.

Installing HOOPS Access

  1. Getting HOOPS Access:

    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 Access to be taken to the Developer Zone.

      ../_images/download-links.png
    • Lastly, click the Download button.

      ../_images/download-access.png

    The evaluation package is available as a .tar.gz file archive.

    Read the Directory Structure page for more information about the download package content.

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

  2. Obtaining, Setting Up and Checking the License:

    Before you can use this product, you must have a valid HOOPS Access license:

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

      ../_images/access-license.png

    You will need to copy and paste your new license key into the license file available in your installation folder:

    • Locate the folder where you have previously extracted HOOPS Access on your system.
    • Navigate to the ../src/sam/ directory.
    • Edit the file hoops_license.h and enter your new license key.
    ../_images/enter-license.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 Access 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 HOOPS Access 2.10.0 to HOOPS Access 2.11.0 may use the same key, but those upgrading from 2.0 to 3.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 Access, then the license key that is generated will be a perpetual (non-expiring) license key. If you are evaluating HOOPS Access, 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 Access releases are not binary compatible with older releases. You must recompile your application when updating to a new version of HOOPS Access.

Building HOOPS Access

Now that you’ve completed the setup and successfully configured a valid HOOPS Access license, it’s time to test the installation using sample codes provided with HOOPS Access. The built-in CMake system is the easiest way to compile and link with HOOPS Access.

Since HOOPS Access 1.8.0, we provide CMake support for our sample code.

You need CMake version 3.21.0 or higher.

The example code projects follow a typical CMake workflow. If you are familiar with CMake, no special steps are required. If you are new to CMake, we recommend the official tutorial from Kitware.

To learn more or to download CMake, visit the official website.

Check if you have CMake

You can check if CMake is installed by running the following command in your terminal or command prompt:

cmake --version

This will show the version of CMake on your system. If you do not have it, or if the version is lower than 3.21.0, you should install a newer version.

You can download the installer from the CMake downloads page. There are versions for Windows, macOS, and Linux.

Building sample code with the CMake GUI

CMake has a graphical interface that can help you set up your project step by step. This is available on Windows, macOS, and Linux.

First, open the CMake application.

  • In the field Where is the source code, choose the folder that contains the sample code.
  • In the field Preset, select the preset that matches your platform and compiler.
  • In the field Where to build the binaries, choose a different empty folder. This is where the build files will be created.

Click the Configure button. CMake will ask you which compiler or tool you want to use (see Supported Platforms). After configuration, you will see some options you can change if needed.

Click Generate to create the project files.

Now you can open the generated project in your IDE and build it there.

Building sample code from the command line

If you prefer to use the terminal, you can also run CMake from the command line.

First, create a new folder for the build:

mkdir build
cd build

Generate build files for your project. If you are on Windows, use the following command:

cmake --preset=Windows ..

Visual Studio 16 2019 is the default CMake Generator. This generator can be changed to a more recent Visual Studio version or another generator. Visual Studio 17 2022 generator can be enabled with the following command:

cmake --preset=Windows -G "Visual Studio 17 2022" ..

If you are on Linux, use this instead:

cmake --preset=Linux ..

Once CMake finishes, you can build the code with this command:

cmake --build .

If you are on Linux, you’ll need to add the path of the dependencies in the thirdparty directory to the LD_LIBRARY_PATH environment variable. This allows the dynamic linker to find them at runtime. Here’s an example of how to do this:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/techsoft3d/HoopsSAM/thirdparty/abaqus-odb_api-2023-linux64/lib

Replace /home/techsoft3d/HoopsSAM/thirdparty/abaqus-odb_api-2023-linux64/lib with the actual path to your thirdparty directory.

To facilitate the definition of the LD_LIBRARY_PATH or PATH environment variable, depending on the operating system, CMake advanced variables are created when build files are generated. CEE_SAM_OPTION_EXTERNAL_LIBRARIES_BIN_PATHS will contain all needed binary paths to run the compiled HOOPS Access binary. This variable content can be directly appended to the LD_LIBRARY_PATH or PATH environment variable. Furthermore, on Linux operating systems, libraries may need to be preloaded using the LD_PRELOAD environment variable. These binary paths can be found in the CEE_SAM_OPTION_EXTERNAL_PRELOAD_LIBRARIES_BIN_PATHS CMake advanced variable.

Testing the Build

You can test the CMake configuration and build from the previous step by checking out the examples. Start with vdm_exam1. This initial example opens a CAE file and lists all the datasets.

For Visual Studio:

  • vdm_exam1 is found in the Solution Explorer: Examples->VdmToolsExamples->vdm_exam1

  • Right click on vdm_exam1 and select Properties

    • In Debugging->Command Arguments: Specify the file you want to open. For example bumper.unv found in the exam folder in the distribution:

      ..\src\sam\vdm\exam\bumper.unv
      
    • Run the example. If the path to the file was correct, the content of the file should be listed.

      ../_images/vdm-exam1-output.png

Conclusion

You have successfully set up your environment for HOOPS Access, package download and extraction, license configuration, and testing using sample codes.

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

You are now ready for the first tutorial: Print Table of Contents.