02-16-2024, 09:02 AM
(This post was last modified: 02-19-2024, 12:35 AM by kanta8819@cadian.com.)
hello
// Here we export Viewport3D:
assimpWpfExporter.AddViewport3D(viewport3D);
AssimpWpfExporter.ExportViewport3D(viewport3D, "D:\\test1.glb", exportFormatId);
bool isExported;
try
{
isExported = assimpWpfExporter.Export(fileName, exportFormatId);
// To export to an in-memory object use the ExportToDataBlob that returns a ExportDataBlob with byte array
//var dataBlob = assimpWpfExporter.ExportToDataBlob(exportFormatId);
//if (!isExported)
// MessageBox.Show("Not exported");
}
catch (Exception ex)
{
//MessageBox.Show("Error exporting:\r\n" + ex.Message);
isExported = false;
}
return isExported;
When you run the code above, a test.glb file is created, but when you open it in the viewer, it says it is an incorrect file.
I did the same as the example and it worked fine.
I would like to know where the problem is.
thank you
// Here we export Viewport3D:
assimpWpfExporter.AddViewport3D(viewport3D);
AssimpWpfExporter.ExportViewport3D(viewport3D, "D:\\test1.glb", exportFormatId);
bool isExported;
try
{
isExported = assimpWpfExporter.Export(fileName, exportFormatId);
// To export to an in-memory object use the ExportToDataBlob that returns a ExportDataBlob with byte array
//var dataBlob = assimpWpfExporter.ExportToDataBlob(exportFormatId);
//if (!isExported)
// MessageBox.Show("Not exported");
}
catch (Exception ex)
{
//MessageBox.Show("Error exporting:\r\n" + ex.Message);
isExported = false;
}
return isExported;
When you run the code above, a test.glb file is created, but when you open it in the viewer, it says it is an incorrect file.
I did the same as the example and it worked fine.
I would like to know where the problem is.
thank you