Problems with saving DXF
Posted: 18 Nov 2010, 13:05
I have a big problem with saving DXF file.
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:
To insert next DXF's on the canva I use AddScaledDXFEx method and I work on TsgDXFInsert objects, as follow:
The problem is bigger than I thought before, because users on other computers don't see even chaotic placed DXF on the canva, but only first DXF (first means that one which was read first during my program work). It looks like SaveToFile functions save some kind of references - not DXF file which I really want and which should be readable on each computer (especially in AutoCAD enviroment).
Thank you for any help.
Best regards,
Mariusz Hyżorek
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