Export as DWG

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
gogoalshop
Posts: 1
Joined: 03 Jul 2019, 10:45

Export as DWG

Post by gogoalshop » 03 Jul 2019, 10:48

Hi all,

This is JoJo and i am new here, so i hope i didn't post this question at the wrong part of forum (if i did please let me know).

Question is:
Is it possible with CADImport library opened .dwg files edit and then save as a new .dwg file? It looks like it only allows saving as picture format (.jpg, .bmp...) and as .dxf.

Thanks ahead!!!

support
Posts: 3271
Joined: 30 Mar 2005, 11:36
Contact:

Re: Export as DWG

Post by support » 03 Jul 2019, 19:45

Hello JoJo,

CAD .NET (CADImport.dll) library supports the DWG export through an additional dynamic link library sgcadexp.dll which is installed with CAD .NET and can be found in the following folders:

c:\Users\USER_NAME\Documents\CAD .NET 14\bin\DWGExportLib\Win32\
c:\Users\USER_NAME\Documents\CAD .NET 14\bin\DWGExportLib\Win64\


To export a CADImage object to a DWG file, you need to copy the file sgcadexp.dll to the folder with CADImport.dll and call a static method CADtoDWG.SaveAsDWG. For example:

Code: Select all

public static void SaveCADImageAsDWG(CADImage cadImage, string dwgFilePath)
{
    CADImport.Export.CADtoDWG.SaveAsDWG(cadImage, dwgFilePath);
}
Note: when you run a solution for Any CPU platform on 64-bit Windows, the DWG export requires sgcadexp.dll from the \DWGExportLib\Win64\ folder.

Mikhail
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply