Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

DspGetNearestAn

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the AN nearest to a specified x,y pixel location.

If using groups and the nearest object to the specified coordinates is part of a group, the AN of the object is returned, not the AN of the group.

If using clipping objects completely clipped ANs will be ignored when determining the nearest AN to the specified x, y pixel location. Partially clipped ANs are treated as being fully visible.

Syntax

DspGetNearestAn(X, Y)

X:

The x coordinate (in pixels).

Y:

The y coordinate (in pixels).

Return Value

The animation point number (AN). A value of -1 is returned if no AN is found.

DspGetMouse, DspAnGetPos, DspGetAnFromPoint

Example

DspGetMouse(X,Y);
! Gets mouse position.
AN=DspGetNearestAn(X,Y);
! Gets AN nearest to the mouse.
Prompt("Mouse At AN"+nAN:###);
! Displays AN nearest to the mouse.

See Also

Display Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in