Table of contents
TOC
Collapse the table of content
Expand the table of content

Viewer.ShapeAtPoint Property (Visio Viewer)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Gets the ID of the shape in the drawing that is open in Microsoft Visio Viewer, at the specified point in the Visio Viewer window, in the coordinate system of the window, measured in pixels. Read-only.

Syntax

expression. ShapeAtPoint( X, Y)

_expression_An expression that returns a Viewer object.

Parameters

NameRequired/OptionalData TypeDescription
XRequiredLongThe x-coordinate, in pixels, of the point.
YRequiredLongThe y-coordinate, in pixels, of the point.

Return Value

Long

Remarks

The origin of the coordinate system of the Visio Viewer window is the upper left corner. The positive x-direction is to the right, and the positive y-direction is down.

If there is no shape at the specified point, the ShapeAtPoint property returns 0.

Example

The following code gets the ID of the shape at point (200, 200) in the drawing that is open in Visio Viewer.

Debug.Print vsoViewer.ShapeAtPoint (200, 200)
© 2018 Microsoft