![]() |
|
assimpWpfExporter conversion issue - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Viewer3ds and Ab3d.Reader3ds (https://forum.ab4d.com/forumdisplay.php?fid=5) +--- Thread: assimpWpfExporter conversion issue (/showthread.php?tid=4439) |
assimpWpfExporter conversion issue - kanta8819@cadian.com - 02-16-2024 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 |