Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 23, 2021 06:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/becd0e0ca2b56e2eda7b399f1d4f0c8c to your computer and use it in GitHub Desktop.
Save aspose-com-gists/becd0e0ca2b56e2eda7b399f1d4f0c8c to your computer and use it in GitHub Desktop.
Convert DXF to FBX or glTF GLB file Programmatically in C# .NET
// Load input DXF file with Scene class.
Aspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene("Test.dxf");
// Initialize FBXSaveOptions class object.
Aspose.ThreeD.Formats.FBXSaveOptions options = new Aspose.ThreeD.Formats.FBXSaveOptions(Aspose.ThreeD.FileFormat.FBX7200ASCII);
// Convert DXF to FBX file.
scene.Save("Test.fbx", options);
// Load input DXF file with Scene class.
Aspose.ThreeD.Scene scene = new Aspose.ThreeD.Scene("Test.dxf");
// Instantiate GLTFSaveOptions class object.
Aspose.ThreeD.Formats.GLTFSaveOptions saveOptions = new Aspose.ThreeD.Formats.GLTFSaveOptions(FileFormat.GLTF2_Binary);
// Set different properties.
saveOptions.EmbedAssets = true;
saveOptions.SaveExtras = true;
// Convert DXF to GLTF GLB file with Save method.
scene.Save("Output.glb", saveOptions);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment