Save CADImage to DXF file

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Artem
Posts: 2
Joined: 04 May 2009, 17:38

Save CADImage to DXF file

Post by Artem » 04 May 2009, 18:12

Hello.
How i can save changed CADImage to DXF file without CADViewerControl?

Code: Select all

CADImage cadImage = CADImage.CreateImageByExtension(filePath);
cadImage.LoadFromFile(filePath);

// some changes in cadImage

// saving

Artem
Posts: 2
Joined: 04 May 2009, 17:38

Re: Save CADImage to DXF file

Post by Artem » 05 May 2009, 09:55

ok, I got it, you can close the thread

Code: Select all

CADImage cadImage = CADImage.CreateImageByExtension(filePath);
cadImage.LoadFromFile(filePath);

// some changes in cadImage

// saving
CADImport.Export.DirectCADtoDXF.CADtoDXF cadExp = new CADImport.Export.DirectCADtoDXF.CADtoDXF(cadImage);
cadExp.SaveToFile(dxfFilePath);
but part of text data has been lost upon saving and the rest has had incorrect formatting...

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

Re: Save CADImage to DXF file

Post by support » 05 May 2009, 11:56

We recommend to use the following code:

Code: Select all

            this.cadImage.GetExtents();          
            this.DoResize();
before saving to DXF file format.

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

Post Reply