Open Table of Contents

Calculate Length

This function is not available via the GUI of ET GeoWizards.

Calculates the length of polylines or the perimeter of polygons. Please see the explanations below

Command line syntax 

ET_GPCalculateLength <input_dataset> {calc_spatial_reference} { | Meters | Kilometers | Feet | Miles | Yards | Inches | Centimeters | Millimeters} {Length_field}

Parameters

Expression Explanation
<input_dataset> A Polyline or Polygon feature class or feature layer.
{calc_spatial_reference} The spatial reference in which the calculations will be performed. If not specified the spatial reference of the input dataset will be used.
NOTE: The spatial reference of the input dataset and the Calculations spatial reference must have the same Geographic Coordinate System
{ | Meters | Kilometers | Feet | Miles | Yards | Inches | Centimeters | Millimeters} Output Units. A String that defines the units in which the length will be calculated.
NOTE: If the the Calculations spatial reference is a Geographic Coordinate System, this parameter will be ignored and the results will be calculated in decimal degrees!!!
{Length_field} Length Field. A String indicating an existing field in which the results for the length  will be stored. If not specified a new field "ET_Length" will be created

Scripting syntax

ET_GPCalculateLength (input_dataset, calc_spatial_reference, output_units, Length_field)

See the explanations above:
<> - required parameter
{} - optional parameter

.NET implementation

CalculateLength(pInFC As IFeatureClass, Optional pSpatialReference As ISpatialReference = Nothing, Optional sDistanceUnits As String = "", Optional sLengthField As String = "") As Boolean

Copyright Ianko Tchoukanski