VisSpatialRelationCodes enumeration (Visio)

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

Remarks

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

Constant Value Description
visSpatialContainedIn &H4 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.
visSpatialContain &H2 A shape can contain another shape. Shape A contains shape B if shape A encloses every region and path of shape B.
visSpatialOverlap &H1 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.
visSpatialTouching &H8 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.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.