SaveAsDWG() exports 10 times bigger file size
Moderators: SDS, support, admin
SaveAsDWG() exports 10 times bigger file size
Hello
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.
I attached the 'before.dwg' file.
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.
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.
Re: SaveAsDWG() exports 10 times bigger file size
Hello Sing,
You didn't attach the before.dwg file.
Mikhail
You didn't attach the before.dwg file.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: SaveAsDWG() exports 10 times bigger file size
Oh... Sorry.
I got an error message ' Sorry, the board attachment quota has been reached.'.
Please download the file by the below link.
(Copy the link address, paste it on the address bar of web-browser, and then press key enter.)
http://magzog.com/saveasdwg/before.dwg
Thank you.
I got an error message ' Sorry, the board attachment quota has been reached.'.
Please download the file by the below link.
(Copy the link address, paste it on the address bar of web-browser, and then press key enter.)
http://magzog.com/saveasdwg/before.dwg
Thank you.
Re: SaveAsDWG() exports 10 times bigger file size
Hello Sing,
Thank you for the file.
Please note that the SaveAsDWG method exports to DWG 2000 file format. If you try to convert your file to DWG 2000 using, for example, Autodesk DWG TrueView 2018, it will export a .dwg file of the size 30 MB.
Try to convert your file to DWG 2000 using AutoCAD and compare results.
Mikhail
Thank you for the file.
Please note that the SaveAsDWG method exports to DWG 2000 file format. If you try to convert your file to DWG 2000 using, for example, Autodesk DWG TrueView 2018, it will export a .dwg file of the size 30 MB.
Try to convert your file to DWG 2000 using AutoCAD and compare results.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: SaveAsDWG() exports 10 times bigger file size
Oh~ I get it.
Thank you for your reply.
Thank you for your reply.
Re: SaveAsDWG() exports 10 times bigger file size
Hello Mikhail
Is there a way to convert from CADImage to .dwg file with a higher version than DWG 2000?
Is there a way to convert from CADImage to .dwg file with a higher version than DWG 2000?
Re: SaveAsDWG() exports 10 times bigger file size
Hello Sing,
Unfortunately, the SaveAsDWG method doesn't allow to specify DWG version for export.
Mikhail
Unfortunately, the SaveAsDWG method doesn't allow to specify DWG version for export.
Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support
Chat support on Skype: cadsofttools.support
Re: SaveAsDWG() exports 10 times bigger file size
I see. Thank you Mikhail.