FindAnnotations()

Summary

Finds the annotations closest to a coordinate

Changes

Added in version 2020.

Syntax

ids = FindAnnotations(string window_spec, coord c)

Argument Contents
window_spec The type and name of the window containing the annotation
c A coordinate

Returns

An array of annotation ids.

Notes

  • FindAnnotations() returns null if no annotation is found.

  • The annotations found depend on the current map scope. At larger scopes, more annotations are found for the same coordinate.

  • For a full list of GISDK functions for annotations, see Freehand Items (Annotations).

Examples

annotation_ids = FindAnnotaions("Map|" + GetMap(), Coord() )

Error Codes

Error Type Meaning
NotFound The specified window does not exist
LanguageError The coordinate type or the window spec type or specification are invalid
Error The coordinate is null

See Also

Function Summary
DeSelectAllAnnotations() Deselects all annotations
DeSelectAnnotation() Deselects an annotation
DropAnnotation() Removes an annotation from a map or layout window
DropAnnotations() Removes annotations from a map or layout window
DuplicateAnnotation() Creates a copy of an annotation
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