1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
procedure TApe.refreshApe();
var
j: integer;
ape: uAperture;
units: uUnits;
layer: uLayer;
begin
units:=uUnits.create;
try
units.setUnit(main.currUnits);
layer:=main.GraphicArea.job.getEditedLayer();
if main.sgLayers.Cells[3, main.sgLayers.Row]<>'' then
begin
// Parse all ape
for j:=0 to layer.numApe-1 do
begin
ape:=layer.getApe(j);
sgApe.Cells[0, j+1]:=IntToStr(ape.num());
sgApe.Cells[1, j+1]:=UpperCase(ape.shape());
if (ape.isIt('cir')) then
sgApe.Cells[2, j+1]:=FormatFloat('0.000000', units.calcUnit(ape.sizeX(), uMM, units.getUnit))
else
sgApe.Cells[2, j+1]:=FormatFloat('0.000000', units.calcUnit(ape.sizeX(), uMM, units.getUnit)) + ' x ' + FormatFloat('0.000000', units.calcUnit(ape.sizeY(), uMM, units.getUnit));
sgApe.RowCount:=2+j;
end;
sgApe.Repaint;
end;
finally
units.Free
end;
end; |
Partager