You can find the information how to export html in this page Exporting Files — HOOPS Visualize HPS Documentation 2022.0.0 documentation .
Instructions on how to do it in mfc_sanfbox:
Instructions
- Open the project properties from Visual Studio
- Navigate to Linker → Input and add hps_sprk_html.lib
Add following code in CHPSView.cpp
#include "sprk_html.h"
void CHPSView::OnUserCode()
{
SprocketPath sPath(GetCanvas(), GetCanvas().GetAttachedLayout(), GetCanvas().GetFrontView(),
GetCanvas().GetFrontView().GetAttachedModel());
try {
HPS::HTML::File::Export(sPath.GetKeyPath(),
"D:\\export.html",
"..\\..\\samples\\data\\HOOPSCommunicatorTemplate.html);
}
catch (IOException const & exc)
{
// something went wrong with the HTML export
}
}