Free Support Forum - aspose.com

Saving dxf file gives error

Hello,

I am trying to save the file with the sample code given in aspose example. But it gives error

code

    String dataDir = Utils.getDataDir(SaveDXFFiles.class) + "CADConversion/";
    String srcFile = dataDir + "conic_pyramid.dxf";    
    CadImage cadImage = (CadImage)Image.load(srcFile);
    cadImage.save(dataDir+"conic.dxf");

Getting following error

  Exception in thread "main" java.lang.NullPointerException
at com.aspose.cad.internal.F.c.a(Unknown Source)
at com.aspose.cad.fileformats.cad.dwg.pageandsection.writer.CadWriter.a(Unknown Source)
at com.aspose.cad.fileformats.cad.dwg.pageandsection.writer.CadWriter.a(Unknown Source)
at com.aspose.cad.fileformats.cad.CadImage.c(Unknown Source)
at com.aspose.cad.DataStreamSupporter.a(Unknown Source)
at com.aspose.cad.DataStreamSupporter.save(Unknown Source)
at com.aspose.cad.examples.DXFDrawings.SaveDXFFiles.main(SaveDXFFiles.java:22)

I am using aspose-cad-20.8.jar

@velotech

I have created an issue with ID CADJAVA-862 in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.