Convert DWG to DWF
Contents
[
Hide
]How to convert DWG to DWF
Aspose.CAD provides the feature to load the AutoCAD DWG file and export it to the DWF format. DWG to DWF conversion approach works as follows:
- Load DWG drawing file using the Image.Load factory method.
- Export the DWG drawing to DXF using the Image.Save method.
Sample Code
The code sample below shows how to convert a DWG file to a DXF format using Aspose.CAD for Java.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String dataDir = Utils.getDataDir(DWGToDWF.class) + "DWGDrawings/"; | |
String inputFile = dataDir+ "Line.dwg"; | |
String outFile = dataDir+ "Line.dwf"; | |
CadImage cadImage = (CadImage)Image.load(inputFile); | |
cadImage.save(outFile); |