Handle changes in DXF save
Posted: 02 Apr 2014, 06:44
Hello.
I tried the following code:
Handle different "test_af1.dxf" and "test_af2.dxf".
Correct?
I want to save the handle unchanged.
thanks,
I tried the following code:
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
wCadImage: TsgCADdxfImage;
c2d: TsgCADtoDXF;
wDir, S: String;
begin
GetDir(0, wDir);
S := IncludeTrailingPathDelimiter(wDir) + 'test.dxf';
wCadImage := TsgCADdxfImage.Create;
wCadImage.LoadFromFile(S);
S := IncludeTrailingPathDelimiter(wDir) + 'test_af1.dxf';
try
c2d := TsgCADtoDXF.Create(wCadImage);
c2d.SaveToFile(S);
finally
if Assigned(c2d) then
c2d.Free;
end;
wCadImage.Free;
wCadImage := TsgCADdxfImage.Create;
wCadImage.LoadFromFile(S);
S := IncludeTrailingPathDelimiter(wDir) + 'test_af2.dxf';
try
c2d := TsgCADtoDXF.Create(wCadImage);
c2d.SaveToFile(S);
finally
if Assigned(c2d) then
c2d.Free;
end;
wCadImage.Free;
end;
Correct?
I want to save the handle unchanged.
thanks,