DuplicateAnnotation()
Summary
Creates a copy of an annotation.
Syntax
id = DuplicateAnnotation(string window_spec, integer id)
| Argument | Contents |
|---|---|
| window_spec | String that contains the window type and name |
| id | ID of the annotation to be copied |
Returns
The integer id of the new annotation, or null if the annotation could not be copied.
Notes
-
The position of the new annotation is identical to the original.
-
Some annotations are marked unique and cannot be duplicated.
-
DuplicateAnnotation() can be used to help create drop shadow effects.
-
For a full list of GISDK functions for annotations, see Freehand Items (Annotations).
Example
new_id = DuplicateAnnotation("Map|My Map", 47)
Error Codes
| Error Type | Meaning |
|---|---|
| NotFound | The window or the specified annotation does not exist |
See Also
| Function | Summary |
|---|---|
| AddAnnotation() | Adds an annotation to a map or layout window |
| DropAnnotation() | Removes an annotation from a map or layout window |
| DropAnnotations() | Removes annotations from a map or layout window |
| GetAnnotation() | Returns the definition of an annotation |
| GetAnnotations() | Return the IDs of all annotations in a map or layout window |
| MoveAnnotation() | Moves an annotation to a new location |
| SetAnnotation() | Modifies an existing annotation in a map or layout window |