SpatialSearch property

SpatialSearch property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

See also         Example         Applies to

Returns a Selection object whose shapes meet certain criteria in relation to a point that is expressed in the coordinate space of a page, master, or group.

Version added

2000

Syntax

        
          objRet = object.SpatialSearch(x, y, relation, tolerance, flags)
      

objRet

A Selection object.

object

Required. An expression that returns a Page, Master, or Shape object.

x

Required Double; x-coordinate.

y

Required Double, y-coordinate.

relation

Required Integer. Any combination of the values of the constants visSpatialContainedIn and visSpatialTouching.

tolerance

Required Double. A distance in internal drawing units with respect to the coordinate space.

flags

Required Integer. Flags that influence the result.

Remarks

For values of the relation argument, see the SpatialRelation property.

If relation is not specified, the SpatialSearch property uses both relationships as criteria.

The flags argument can be any combination of the values of the constants defined in the following table. These constants are also defined in VisSpatialRelationFlags in the Visio type library.

Constant

Value

Description

visSpatialIncludeGuides

&H2

Consider a guide's Geometry section. By default, guides do not influence the result.

visSpatialFrontToBack

&H4

Order items front to back.

visSpatialBackToFront

&H8

Order items back to front.

visSpatialIncludeHidden

&H10

Consider hidden Geometry sections. By default, hidden Geometry sections do not influence the result.

visSpatialIgnoreVisible

&H20

Do not consider visible Geometry sections. By default, visible Geometry sections influence the result.

Use the NoShow cell to determine whether a Geometry section is hidden or visible. Hidden Geometry sections have a value of TRUE and visible Geometry sections have a value of FALSE in the NoShow cell.

Beginning with Visio 2002, if flags contains VisSpatialFrontToBack, items in the Selection object returned by the SpatialNeighbors property are ordered front to back. If visSpatialBackToFront is set, the items returned are ordered back to front. If this flag is not set, or if you are running an earlier version of Visio, the order is unpredictable. You can determine the order using the Index property of the shapes identified in the Selection object**.**

The SpatialSearch property does not consider the width of a shape's line, shadows, line ends, control points, or connection points when comparing two shapes.