CopyPoint()
Summary
Duplicates a point feature in a standard geographic file.
Syntax
new_id = CopyPoint(integer original_id, integer new_id)
| Argument | Contents |
|---|---|
| original_id | The ID of the point to copy |
| new_id | The ID of the new point, or null to generate an ID automatically |
Returns
The integer ID of the new point.
Notes
-
The point layer must be the current layer.
Example
// Copy a Store (point feature) where the user clicks
SetLayer("Stores")
id = RH2ID(LocateNearestRecord(ClickCoord(), 0.25))
new_id = CopyPoint(id, null)
Error Codes
| Error Type | Meaning |
|---|---|
| Error | The current layer is not a point layer, or is not from a standard geographic file; or the new_id is already in use |
| NotFound | There is no feature with the given original_id |
See Also
| Function | Summary |
|---|---|
| AddPoint() | Adds a point feature to a point layer |