AddPoint()

Summary

Add multiple point features to a point layer.

Syntax

new_id = AddPoint(array coordinates, array ids)

Argument Contents
coordinates An array of point locations
ids The IDs of the point to add, or null to generate an IDs automatically

Returns

The integer ID of the new point.

Notes

  • The point layer must be the current layer.

  • The point layer must be an editable maptitude layer (ie. *.dbd) or an Oracle Spatial Layer

  • If one or more of the ids already exist, an error will be occur

  •  

Example

// Add a Store (point feature) where the user clicks
SetLayer("Stores")
coords = { {-72111913,42415200}, {-71805550,42577759}, {-71801975,42654320}}
ids = {1001, 1002}
new_ids = AddPoints(ClickCoord(coords), ids )

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

 

©2026 Caliper Corporation