ImageEn, unit iexLayers

TIEPolylineLayer.CalculateLength

TIEPolylineLayer.CalculateLength


Declaration

function CalculateLength(Units: TIEUnits): double;


Description

Returns the length/perimeter of the lines of the polyline layer.
If PolylineClosed = True, it will measure the perimeter. If not closed, it will only measure the length of all lines.

Note:
 Use TImageEnView.SetScale to adjust the scale of units
 Polyline measurement is less accurate than other layer types


Example

// Show length of current polyline in MM
ShowMessage( 'Length is ' + Trunc( TIEPolylineLayer( ImageEnView1.CurrentLayer).CalculateLength( ieuMillimeters )) + ' mm' );


See Also

 CalculateArea
 CalculateCentroid
 SetScale
 Dpi
 MeasureUnits