Page 1 of 1

AutoCad Export with no Success

Posted: 21 Mar 2008, 19:41
by aby
Hi,

I've imported a AutoCad dwg using CadImportVCL, and export to a dxf file like the following.

boost::shared_ptr<TsgDXFExport > Exp(new TsgDXFExport());
Form->PaintTo(Exp->Canvas->Handle, 0, 0);
Exp->EndDraw();
AnsiString ResFileName = AnsiString(Proje->Dir);
ResFileName += "KALIP.DXF";
Exp->SaveToFile(ResFileName);


I've imported the exported DXF file to AutoCad.

The results are unacceptable. [:(!]

Posted: 21 Mar 2008, 19:46
by aby
Hi,

I've searched the pas files and found the CADtoDXF.pas.
I've exported the Image like the following.

boost::shared_ptr<TsgCADtoDXF > Exp(new TsgCADtoDXF( dynamic_cast<TsgDXFImage *> (DwgNavigator->Picture->Graphic) ));
AnsiString ResFileName = AnsiString(Proje->Dir);
ResFileName += "KALIP.DXF";
Exp->SaveToFile(ResFileName);


When I try to import to AutoCad from newly create DXFile its giving an Premature dxfin error.


What am I missing.

Thanks

Aby

Posted: 23 Mar 2008, 03:34
by support
Hello Aby,

It is necessary to use CADtoDXF module. You can find respective example in the Viewer demo:

Code: Select all

void __fastcall TForm1::SaveToDXF(AnsiString AFileName)
...
      vExpCADfile = new TsgCADtoDXF((TsgDXFImage *)vGr);
      try
      {
        vExpCADfile->SaveToFile(AFileName);
      }
      __finally
      {
        delete vExpCADfile;
      }
... 
Sergey.

Please post questions to the forum or write to support@cadsofttools.com

Posted: 23 Mar 2008, 03:51
by support
We have tested your KALIP.dwg. Problem of export to DXF file format is solved in beta version of CADtoDXF module. Please contact to our executive manager Evgeny Chuzhakin to info@cadsofttools.com accordingly the question of getting updates.

Sergey

Please post questions to the forum or write to support@cadsofttools.com