HOOPS Visualize sandbox works with HOOPS Exchange integration as this page.
When you want to use HOOPS Exchange API directly in sandbox, you will need to load and initialize HOOPS Exchange library as followings.
Initializing HOOPS Exchange — HOOPS Exchange 2022_SP2 documentation
Instructions for HPS_MFC_Sandbox
- Open the project properties from Visual Studio with a right click
- Navigate to C/C++ → General and add
$(HEXCHANGE_INSTALL_DIR)\includein Additional Include Directories
HEXCHANGE_INSTALL_DIRis a environment variable. Its value must be the root of a HOOPS Exchange package before launching Visual Studio.
- Navigate to C/C++ → Preprocessor and add
USING_EXCHANGEin Preprocessor Definitions
- Navigate to Linker → Input and add
hps_sprk_exchange.libin Additional Dependencies
- Add include and define the macro in CHPSApp.cpp
#define INITIALIZE_A3D_API
#include <A3DSDKIncludes.h>
- Add the following code to
CHPSApp::InitInstance()to load and initialize HOOPS Exchange library
A3DBool loaded = A3DSDKLoadLibrary(bin_dir.str().data());
assert(loaded);
A3DLicPutUnifiedLicense(HOOPS_LICENSE);
A3DStatus result = A3DDllInitialize(A3D_DLL_MAJORVERSION, A3D_DLL_MINORVERSION);
assert(result == A3D_SUCCESS);
- Add the following code to
CHPSApp::ExitInstance()to terminate and unload the library
#ifdef USING_EXCHANGE
{
A3DDllTerminate();
A3DSDKUnloadLibrary();
}
#endif
- Add include
A3DSDKIncludes.hin CHPSView.cpp
- Add your code to
CHPSView::OnUserCode()with HOOPS Exchange API





