GetFeatureLength()
Summary
Returns the length of the feature in current map units.
Changes
Added to Version 2018.
Syntax
area = GetFeatureLength(integer area_id)
| Argument | Contents |
|---|---|
| line_id | The ID of the line feature |
Returns
A real number with the length of the feature in current map units.
Notes
-
GetFeatureLength() works only when the current layer is a line layer.
Example
rh = GetFirstRecord(,)
id = rh2id(rh)
length = GetFeatureLength(id)
ShowMessage("Line ID=" + rh + " is " + r2s(length ) + " " + GetMapUnits())
See Also
| Function | Summary |
|---|---|
| GetArea() | Gets the coordinates that describe an area feature |
| GetPolygonArea() | Computes the area of a closed polygon |
| GetFeatureArea() | Returns the area of the feature in current map units |