DWG to FBX Java

DWG files are used to work with CAD drawings while FBX format is commonly used by 3D modeling applications. In some use cases, you may want to convert a DWG file to an FBX file. In accordance with such requirements, this article demonstrates how to convert a DWG file to an FBX file programmatically in Java.

DWG to FBX Conversion – Java API Installation

Aspose.CAD for Java API can be used to create, edit, or manipulate DWG and several other file formats. You can install the API by downloading its JAR file from the Downloads section or use the following configurations to access the API from Aspose Repository:

Repository:

<repositories>
    <repository>
        <id>AsposeJavaAPI</id>
        <name>Aspose Java API</name>
        <url>http://repository.aspose.com/repo/</url>
    </repository>
</repositories>

Dependency:

 <dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-cad</artifactId>
        <version>21.11</version>        
   </dependency>
</dependencies>

Convert DWG to FBX Programmatically in Java

You need to follow the steps below for converting DWG to FBX file:

  1. Load the input DWG file with the Image class.
  2. Instantiate an instance of the FbxOptions class.
  3. Write the output FBX file with the Save method.

The code snippet below shows how to convert DWG to an FBX file programmatically in Java:

Explore More Features

You can go through the documentation section to learn several other features offered by the API.

Get Free Temporary License

You can evaluate the API without any evaluation limitations by requesting a free temporary license.

Conclusion

In this article, you have learned how to convert a DWG file to FBX format in Java. You can automate the conversion process for converting any number of files into a folder by customizing the code snippet. In case of any inquiries, please feel free to contact us at the forum.

See Also