Problems with dxfexportvcl
Posted: 16 May 2006, 16:28
Hi,
i have a problem with the dxfexportvcl. When i execute the following
code i got an dxf which contains nothing. Can you help me? Where is my mistake?
Greetings and thx for help
i have a problem with the dxfexportvcl. When i execute the following
code i got an dxf which contains nothing. Can you help me? Where is my mistake?
Greetings and thx for help
Code: Select all
<b>procedure</b> TForm1.Button1Click(Sender: TObject);
<b>var</b>
E : TsgDXFExport;
Data : TdxfExportData;
<b>function</b> MakedxfPoint(x,y,z : Single) : TdxfPoint;
<b>begin</b>
result.X := x;
result.Y := y;
result.Z := z;
<b>end</b>;
<b>begin
try</b>
Data.Color := clBlack;
Data.Thickness := 3;
Data.Point := MakedxfPoint(0, 0, 0);
Data.Point1 := MakedxfPoint(100, 100, 0);
Data.Style := PS_SOLID;
E := TsgDXFExport.Create;
E.BeginBlock('Test');
E.AddLine(Data);
Data.Point := MakedxfPoint(0, 0, 0);
Data.Point1 := MakedxfPoint(10, 50, 0);
E.AddLine(Data);
Data.Point := MakedxfPoint(10, 50, 0);
Data.Point1 := MakedxfPoint(100, 100, 0);
E.AddLine(Data);
Data.Point := MakedxfPoint(10, 50, 0);
Data.Text := 'TestText';
Data.FName := 'Arial';
Data.FHeight := 15;
E.AddText(Data);
E.EndBlock;
E.EndDraw;
E.SaveToFile('C:\tmp\maling.dxf');
<b>finally</b>
E.Free;
<b>end</b>;