GetMultiLine()

Summary

Gets the coordinates that describe the location of a multiple part line feature.

Syntax

pts = GetMultiLine(integer id)

Argument Contents
id The ID of the line feature

Returns

An array of arrays of coordinates in their topological order, one sub-array for each part of the line. The from node is the first coordinate and the to node is the last coordinate in a sub-array.

Notes

  • The current layer must be a line layer.

  • Some types of layers, such as Esri Shapefiles, can have lines with multiple parts. GetLine() indicates this with the NonUnique error. Use GetMultiLine() to get the coordinates for lines from layers of these types.

Example

pts = GetMultiLine(123)
dist = 0
for j = 1 to pts.length do
for i = 1 to pts[j].length - 1 do
dist = dist + GetDistance(pts[j][i], pts[j][i + 1])
end
end
ShowMessage("The length of the line is " + String(dist))

Error Codes

Error Type Meaning
Error Layer is not the correct type
NotFound No line feature exists with the given ID

See Also

Function Summary
GetLine() Gets the coordinates that describe the location of a line feature
GetPoint() Gets the location of the point feature with the specified ID
GetArea() Get the coordinates that describe an area feature