Hi,
I am currently working on a code that will automate the modification of dwg drawings including adding blocks and attributes. I am using the Aspose.CAD free library in C# and I am trying to edit the .dwg file. The issue is that every time I save my file, when I try to re-open it, the file is corrupt. This problem happens when I modify the file but it also happens when I only open and save it without any modification.
My code:
using Aspose.CAD;
using Aspose.CAD.FileFormats.Cad;
public abstract class EditCad
{
public static void addLine(string path)
{
using (CadImage cadImage = (CadImage)Image.Load(path))
{
cadImage.Save("mypath/test.dwg");
}
}
}
Thank you!