### 15.5.10. length

Computes the length of the specified line as the sum of the distances between the points making up the line.

    length()@<Location>

where:

- `<Location>` is any 1D location. Specifying a 2D location will not produce an error; the sum of the edge lengths from the elements in the locator will be returned.

`length()@Polyline1` returns the length of the polyline.

#### 15.5.10.1. Tools > Command Editor Example

    >calculate length, <Location>

Note: While using this function in Power Syntax, the leading character is capitalized to avoid confusion with the Perl internal command “length”.

#### 15.5.10.2. Tools > Function Calculator Example

This example calculates the length of a polyline.

Function: `length`, Location: `Polyline1`.

Release 18.2 - © ANSYS, Inc. All rights reserved.