When I try to save the result of my program consist many DXF's on the canva (picture) then instead of one big DXF consist my previous positioned DXF's in proper positions, I recieve one file with chaotic placed DXF's.
To save a file I use folowing code:
Code: Select all
TsgCADtoDXF * vExpCADfile;
TGraphic * vGr = sgPaintBox->Picture->Graphic;
if ((vGr)&&(vGr->InheritsFrom(__classid(TsgCADImage))))
{
vExpCADfile = new TsgCADtoDXF((TsgCADImage *)vGr);
try
{
vExpCADfile->SaveToFile(SaveDialog3->FileName);
ShowMessage("Export to DXF done");
}
__finally
{
delete vExpCADfile;
}
Code: Select all
if(InsertList == NULL)
{
Insert = vGlobalCADFile->AddScaledDXFEx(vCADFiles,FileName,P,Scale,0);
vGlobalCADFile->Converter->Loads(Insert);
InsertList = new TList;
InsertList->Add(Insert);
sgPaintBox->Picture->Graphic = vGlobalCADFile;
vGlobalCADFile = GetImg();
}
Thank you for any help.
Best regards,
Mariusz Hyżorek