Integrating with HOOPS Publish
(Page 2 of 2)
In Visualize, there are two ways to export to HTML, either through the HTML sprocket or through the Publish sprocket. With the Publish sprocket, it's possible to import a CADModel from the Exchange sprocket; this offers a performance benefit because the model data can be read directly from the PRC created in Exchange without incurring the overhead needed for data conversion.
(Please note, the Publish HTML export feature is only available for 64-bit versions of the Visualize API, and a HOOPS Exchange license is necessary to import files with the Exchange sprocket.)
To export your CAD model to HTML, first import it via the Exchange sprocket:
Once the import has completed, set a new CADModel object to the CADModel retrieved from the import notifier. Then call Publish::File::ExportHTML() with your CADModel object, the output file path, and the HTML template file.
For your convenience, there are two template files in the Visualize package, HOOPSCommunicatorTemplate.html and HOOPSCommunicatorMinimalTemplate.html. The standard template includes advanced UI features, whereas the minimal template only includes the basic functionality for viewing a model.
For more information on modifying an HTML template file, please see Modifying the HTML Template.