Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

Code Block
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 (...)
{
}

...

Code Block
#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);
}

 For more information, check out our forum post.