VisSpatialRelationCodes Enumeration (Visio)

Office 2013 and later

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Codes for spatial relationships between shapes to be passed to the Shape.SpatialRelation property.

The spatial relationship between shapes can be indicated by any combination of the following values.






A shape can be contained within another shape. Shape B is contained within shape A if shape A encloses every region and path of shape B.



A shape can contain another shape. Shape A contains shape B if shape A encloses every region and path of shape B.



Two shapes can overlap. Shapes overlap if their interior regions have at least one point in common. You will also get this result if you compare a shape to itself or if either shape is a sub-shape of the other.



A shape can be touching another shape. Shape A touches shape B if neither one contains or overlaps the other and they have one or more common points whose distance is within the specified tolerance.