Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Created August 16, 2022 18:02
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/88e232ff4104dc39665c8163d1ccb941 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/88e232ff4104dc39665c8163d1ccb941 to your computer and use it in GitHub Desktop.
Convert OBJ to DXF File Programmatically in C# .NET
// Load the OBJ file using the Image class
using (var image = Aspose.CAD.Image.Load("template.obj"))
{
// Create an object of CadRasterizationOptions class
Aspose.CAD.ImageOptions.CadRasterizationOptions rasterizationOptions = new Aspose.CAD.ImageOptions.CadRasterizationOptions()
{
PageWidth = 1600,
PageHeight = 1600
};
// Create an object of DxfOptions class
Aspose.CAD.ImageOptions.DxfOptions options = new Aspose.CAD.ImageOptions.DxfOptions();
// Set the VectorRasterizationOptions property
options.VectorRasterizationOptions = rasterizationOptions;
// Export OBJ to DXF
image.Save("output.dxf", options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment