AddPoint()

Summary

Adds a point feature to a point layer.

Syntax

new_id = AddPoint(coord 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 point.

Notes
  • The point layer must be the current layer.

  • The point layer can be an Oracle Spatial layer.

  • Example

    // Add a Store (point feature) where the user clicks
    SetLayer("Stores")
    new_id = AddPoint(ClickCoord(), )
    ShowMessage("The new point has an ID of " + String(new_id) + )

    Error Codes

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

    See Also

    Function Summary
    DeletePoint() Deletes a point feature from an area layer