I found something strange today.
The thing is that
SaveAsDWG() exports and saves 10 times a bigger file size than the original one even though nothing did except load and save. It takes quite along. Loading time takes about 5 seconds, and saving time takes more than 10 sec.
And then, open the output file 'after.dwg' in AUTOCAD and save it.
The file size is changed back to the original file size.
My code is below.
Code: Select all
string filepath = "before.dwg"; // about 3 MB
var cadImage = CADImage.CreateImageByExtension(filepath);
cadImage.LoadFromFile(filepath);
CADImport.Export.CADtoDWG.SaveAsDWG(cadImage, "after.dwg"); // about 30 MB
Tested version
------------------------------------------
CADImport.dll
------------------------------------------
14.1.0.40930
14.1.0.45509
14.1.0.47042
------------------------------------------
sgcadexp.dll
------------------------------------------
29th of Apr, 2020
31st of Jan, 2020
------------------------------------------
Thank you.