10 Easy Steps for Integrating HOOPS Exchange with HOOPS Visualize
HOOPS Exchangeis Tech Soft 3D’sCAD data interoperability (data converter) library. It also helps in importing CAD model data into HOOPS Visualize (Tech Soft 3D’s 3D rendering library). Through Exchange, you can access assembly information, visualization data, and PMI annotations for inspection or manipulation within the context of a Visualize scene graph. Any file that can be loaded by the Exchange libraries can be loaded into Visualize.
The steps below will help you to integrate HOOPS Exchange with Visualize assuming the HOOPS Exchange license is in place.
1. Before starting with HOOPS Exchange integration set up your application with HOOPS Visualize (refer to blogs 1 and 2 for HOOPS Visualize integration)
2. Download HOOPS Exchange binaries from Tech Soft 3D portal.
3. Add an environment variable ‘HEXCHANGE_INSTALL_DIR’ and set the path of Exchange binaries to use like x86 or x64 bit binaries. If you don’t want to add any new environment variable to your system then you can also achieve the same thing by updating the properties of cc_exchange_lib project in the HOOPS Visualize solution.
Open HOOPS Visualize solution in Visual Studio, select cc_exchange_lib project and go to properties. Then go to ‘C/C++>General> Additional include directories’ and replace ‘$(HEXCHANGE_INSTALL_DIR)\include’ with the include folder path of your HOOPS Exchange binaries.
4. Visualize the solution that comes with the ‘cc_exchange_lib’ project. The project can be found at location ‘HOOPS_Visualize_20XX>samples>cc_exchange_lib’. After compiling this project, it generates a ‘cc_exchange_lib.dll’ DLL which you need to add as a Reference in your application.
5. In the system path variable add the path of Exchange dlls (that you have downloaded), for example, to use ‘x64 bit’ binaries, add the corresponding path to the path variable.
6. Now the application is ready to use Exchange APIs, below steps show how to add a button in the toolbar and load a CAD model in Visualize.
7. To add a toolbar in the main window you need to add a new XAML file (choose any name for the file). In the XAML file add the below code inside the grid tag.
Also in the ‘MainWindow.xaml ’ file update the xmlns:local‘’ line (as shown below). As the toolbar is created in a separate file so you need to connect the path accordingly, else you will get build errors. Here ‘DemoViewer’ is the project name and ‘View’ is the sub-folder created in the project where the toolbar file is present.
9. Inside the MyToolbar.xaml.cs file add the below function which will load the CAD file using Exchange API.
10. Now build and run the application, click on the toolbar button and load the CAD file in Visualize using Exchange (below is the snapshot for the same).
Fig: CAD file in Visualize using Exchange
That’s it! You are all set. You can also use an Exchange notifier object to show a progress bar while importing CAD files. You can use this as a starting point for your product and add features viz. assembly browser, model properties explorer etc.
We at ProtoTechSolutions are experts in all the libraries provided by Tech Soft 3D and have built numerous successful products using these in the last two decades. If you have a product idea that needs to support 3D visualization and read and write various engineering file formats, our development team can help you quickly manifest it and bring it out to the market. Connect with us at firstname.lastname@example.org
Follow ProtoTech Solutions for software technology industry trends and Global CAD news and updates.