←Select platform

GetPolyRulerLength Method

Summary

Helper method to get the total length of a poly ruler.

Syntax

C#
VB
C++
  
Public Shared Function GetPolyRulerLength( _ 
   ByVal points As Leadtools.RasterCollection(Of AnnPoint), _ 
   ByVal measurementUnit As Leadtools.Annotations.AnnUnit, _ 
   ByVal converter As Leadtools.Annotations.AnnUnitConverter _ 
) As Leadtools.Annotations.AnnLength 

Parameters

points
Poly ruler points.

measurementUnit
The desired measurement unit.

converter
Unit converter to use.

Return Value

An AnnLength object that contains the total length of the poly ruler in the desired measurement units.

Remarks

GetPolyRulerLength is a helper method that can be used to obtain the total length of a poly ruler object.

Example

C#
VB
using Leadtools; 
using Leadtools.Annotations; 
using Leadtools.Codecs; 
using Leadtools.WinForms; 
 
private void GetPolyRulerLengthExample(AnnContainer container, AnnPolyRulerObject polyRuler) 
{ 
   // Get the total length in inches 
   AnnLength totalLength = AnnPolyRulerObject.GetPolyRulerLength( 
      polyRuler.Points, 
      AnnUnit.Inch, 
      container.UnitConverter); 
   MessageBox.Show("Total length is " + totalLength.ToString()); 
} 
Imports Leadtools 
Imports Leadtools.Annotations 
Imports Leadtools.Codecs 
Imports Leadtools.WinForms 
 
Private Sub GetPolyRulerLengthExample(ByVal container As AnnContainer, ByVal polyRuler As AnnPolyRulerObject) 
   ' Get the total length in inches 
   Dim totalLength As AnnLength = AnnPolyRulerObject.GetPolyRulerLength( 
      polyRuler.Points, 
      AnnUnit.Inch, 
      container.UnitConverter) 
   MessageBox.Show("Total length is " + totalLength.ToString()) 
End Sub 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations Assembly