Third-party Integration

HOOPS Exchange

If you have a HOOPS Exchange license, Exchange support can be added to the MFC, WPF, Cocoa, and Qt sandboxes.

To use Exchange with the WPF sandbox, you must add USING_EXCHANGE to the list of "Conditional Compilation Symbols" in the WPF Visual Studio project file. You must also add a Reference in the Visual Studio project to hps_cs_sprk_exchange.dll. In the properties for the Reference to hps_cs_sprk_exchange.dll, set the Copy Local property to False.

To enable Exchange support in all other sandboxes, the project must be compiled with the USING_EXCHANGE preprocessor flag, and must be linked to hps_sprk_exchange.lib.

When using the sandboxes with Exchange, you need to locate the Exchange libraries for the application by calling HPS::World::SetExchangeLibraryDirectory. Alternatively, you may set the environment variable HEXCHANGE_INSTALL_DIR to the Exchange path.

If you load an Exchange file which has configurations, the "Configurations" tab of the model browser will display a list of the configurations in the file. If you double-click on a configuration, that configuration will be loaded from the file, replacing the currently loaded model.

HOOPS Publish

If you have a HOOPS Publish license, Publish support can be added to the MFC, WPF, and Qt sandboxes. In order to be able to save 3D PDFs you will need to rebuild the sandbox with the USING_PUBLISH preprocessor definition. You will also need to link against sprk_publish.

When USING_PUBLISH is defined, the sandboxes look for the HPUBLISH_INSTALL_DIR environment variable, which needs to be set by the user to point to the Publish installation directory.

Note that the 3D PDF export is only enabled when those sandboxes are run in Windows, since Publish is currently not supported anywhere else when integrated into HPS.

Parasolid

To enable Parasolid support, the sandbox must be compiled with the USING_PARASOLID preprocessor flag, and must be linked to hps_sprk_parasolid.lib.

The pskernel.dll must be located in your system path. Or, for debugging, in the Configuration Properties, under Debugging in the Environment field, set the PATH variable to PATH=<PARASOLID_INSTALL_DIR>\base64_vXXX\dll\<LocalDebuggerEnvironment>

Also in the Configuration Properties, under Additional Include Directories for the C/C++ section, add the location of your Parasolid header files, for example:
C:\parasolid\parasolid_30.1.262\base64_vXXX

In the Linker section of Configuration Properties, in the Additional Library Directories field, set the location of the Parasolid DLLs. For example:
C:\parasolid\parasolid_30.1.262\base64_vXXX\dll

The WPF sandbox requires that you add USING_PARASOLID to the list of "Conditional Compilation Symbols" in its project file, and you must add a reference to cs_sprk_parasolid.

Additionally, some Parasolid files require schema files for import. For those files, it is necessary to set the schema directory using either HPS::World::SetParasolidSchemaDirectory or the P_SCHEMA environment variable. Alternatively, you can place the schema subdirectory in the same folder as the executable.

Exchange-Parasolid

To use the Exchange-Parasolid sprocket, follow the instructions above for Exchange and Parasolid. In addition, your application must be linked to hps_sprk_exchange_parasolid.lib.

RealDWG

Please note, you must be a RealDWG licensee in order to use the RealDWG interface. RealDWG is only available on Windows platforms.

To use RealDWG with the WPF sandbox, you must add USING_DWG to the list of "Conditional Compilation Symbols" in the WPF Visual Studio project file. You must also add a Reference in the Visual Studio project to hps_cs_sprk_dwg.dll. In the properties for the Reference to hps_cs_sprk_dwg.dll, set the Copy Local property to False.

To enable RealDWG support in the MFC Sandbox, the project must be compiled with the USING_DWG preprocessor flag, and must be linked to hps_sprk_dwg.lib.

For more information on using RealDWG, please see the Programming Guide.

Notes on WPF Sandbox

The WPF Sandbox supports both WinForms and D3DImage canvases with DX11. For an example on how they are used, see SprocketsWPFControl.cs in the wpf_sandbox project. WinForms is the default. If you want to use D3DImage, you'll have to define the USE_D3D_IMAGE_CANVAS variable as shown in the code. Other relevant lines are:

public SprocketsWPFControl(HPS.Window.Driver driver, string canvasName)
{
_canvas = new HPS.D3DImageCanvas(driver, canvasName);
// the following line sets the D3D image source
Source = _canvas.ImageSource;
Stretch = Stretch.Fill;
AllowDrop = true;
SizeChanged += SprocketsWPFControl_SizeChanged;
HPS.View view = HPS.Factory.CreateView(canvasName);
Canvas.AttachViewAsLayout(view);
}

Lastly, you must add a reference to the sprk_d3dimage library in order to use D3DImage.

Notes on Qt Sandbox

For users of the Qt Sandbox, please note that we do not ship project build files other than the canonical Qt .pro format. Generation of Visual Studio projects, Xcode projects, and makefiles can be done through the Qt package's utilities.

Mac users: Starting with Catalina, macOS will now warn if dynamic libraries are loaded outside system directories or app bundles. If you see a message from Qt Creator when deploying the Sandbox saying the HPS libraries appear to be "malware" or "may be corrupt" - it is because Qt Creator is trying to load the libraries stored outside the bundle. This can be resolved by going to the "Project" tab, navigating to the "Run" configuration, expanding the "Run Environment" section and modifying the <span class='code">DYLD_LIBRARY_PATH entry so that it doesn't include an entry for the HPS package's bin/mac directory.