Hello,
the unique way to calculate the ruler length is:
function FixedGetObjDiagLen(ie:TImageEnVect; hobj: integer): double;
var
lx, ly: double;
r:TRect;
begin
ie.GetObjRect(hobj, r);
lx := abs(r.Right-r.Left) * ie.MeasureCoefX;
ly := abs(r.Bottom-r.Top) * ie.MeasureCoefY;
result := sqrt(lx * lx + ly * ly);
end;
It comes from the TImageEnVect.GetObjDiagLen help description.