AddNode()

Summary

Adds an endpoint to a standard geographic line file.

Syntax

new_id = AddNode(coordinate coordinate, integer ID)

Argument Contents
coordinate The location of the point
ID The ID of the point to add, or null to generate an ID automatically

Returns

The integer ID of the new endpoint.

Notes

  • The endpoint layer must be the current layer.

Example

// Add an Intersection where the user clicks
SetLayer("Xsections")
new_id = AddNode(ClickCoord(), )
ShowMessage("The new node has an ID of " + String(new_id))

Error Codes

Error Type Meaning
Error The current layer is not an endpoint layer, or is not from a standard geographic file; or ID is already in use

See Also

Function Summary
DeleteNode() Deletes an endpoint feature from a standard geographic file
MoveNode() Changes the location of an endpoint feature in a standard geographic file
SplitLink() Splits a line feature at a given coordinate