I hope someone can help me here. I use the yCad library to read multiple dxf files and output the composite model to dxf format.
The initial process of reading the file is complete. However, when I save the file, it is saved without a model.
Here is an example of the code used to save the dxf file
public static boolean SaveDxf(String outputPath, String fileName, Yxxf model)
{
try
{
model.iohandler = new YutilIOHandler();
model.ioname = new YutilIOHandlerName(fileName);
model.ioname.dstfile = outputPath + "\\" + fileName + ".dxf";
YdxfPutHandler handler = new YdxfPutHandler();
handler.commandPutMainStart(model.iohandler, model);
return true;
}
catch(Exception ex)
{
System.out.println("failed to save dxf file: " + ex.getMessage());
return false;
}
}
When a file is viewed from the editor, an error is reported when the model is empty.
The error occurs even when the dxf file is read and then saved without manipulation.
source
share