GetNodeLinks()

Summary

Gets the IDs of links that begin or end at a node.

Syntax

link_list = GetNodeLinks(integer node_id)

Argument Contents
id ID of a node

Returns

An array of link IDs.

Notes

  • GetNodeLinks() works only when the current layer is a node (endpoint) layer in a map. The function does not work on a layer that has been added to the workspace only.

Example

// This macro gets a list of all lines in and out of a point
SetLayer("Intersection")
id = RH2ID(LocateNearestRecord(ClickCoord(), 0.25))
link_list = GetNodeLinks(id)

Error Codes

Error Type Meaning
Error The current layer is of the wrong type
NotFound There is no node with this ID in the current layer

See Also

Function Summary
GetEndpoints() Returns the IDs of the two endpoints of a link
GetLinkLayer() Gets the name of the link layer associated with a node layer
GetNodeLayer() Get the name of the node layer associated with a link layer