When you export Visualize data to non-PRC file format, you first export to PRC, then use Exchange to translate the file to the format of your choice.
try
{
HPS::SprocketPath sprocket_path(GetCanvas(), GetCanvas().GetAttachedLayout(), GetCanvas().GetFrontView(), canv.GetFrontView().GetAttachedModel());
HPS::Exchange::ExportNotifier notifier = HPS::Exchange::File::ExportPRC(sprocket_path.GetKeyPath());
notifier.Wait();
if (notifier.Status() == HPS::IOResult::Success)
{
HPS::Model Model = HPS::Factory::CreateModel();
Exchange::CADModel modelFile = Exchange::Factory::CreateCADModel(Model, notifier.GetModelFile());
HPS::Exchange::ExportOBJOptionsKit option = HPS::Exchange::ExportOBJOptionsKit::GetDefault();
HPS::Exchange::File::ExportOBJ(modelFile, "output.obj", option);
}
}
catch (...)
{
}
Or you can export with HOOPS Exchange API instead of the Visualize-Exchange API.
In this case, A3DSDKIncludes.h
needs to include, and initializing the library.
Initializing HOOPS Exchange — HOOPS Exchange 2022_SP2 documentation
#define INITIALIZE_A3D_API
#include <A3DSDKIncludes.h>
---------------------
A3DSDKHOOPSExchangeLoader sHoopsExchangeLoader(HOOPS_EXCHANGE_BINARY_DIRECTORY);
if (sHoopsExchangeLoader.m_eSDKStatus == A3D_SUCCESS)
{
sHoopsExchangeLoader.m_psModelFile = notifier.GetModelFile();
A3DExport sExport("output_ex.obj");
sHoopsExchangeLoader.Export(sExport);
}