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

Selection.LayoutIncremental Method (Visio)

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

Makes small adjustments to the position of shapes in the selection to better align the shapes or to space them evenly from other shapes.


expression . LayoutIncremental( AlignOrSpace , AlignHorizontal , AlignVertical , SpaceHorizontal , SpaceVertical , UnitCode )

expression A variable that represents a Selection object.


NameRequired/OptionalData TypeDescription
AlignOrSpaceRequiredVisLayoutIncrementalTypeThe type of incremental layout action to perform (alignment, spacing, or both). See Remarks for possible values.
AlignHorizontalRequiredVisLayoutHorzAlignTypeIndicates how Microsoft Visio aligns shapes horizontally when it aligns incrementally. See Remarks for possible values.
AlignVerticalRequiredVisLayoutVertAlignTypeIndicates how Visio aligns shapes vertically when it aligns incrementally (except if layout style is circular). See Remarks for possible values.
SpaceHorizontalRequiredDoubleThe edge-to-edge horizontal spacing. Must be greater than or equal to zero.
SpaceVerticalRequiredDoubleThe edge-to-edge vertical spacing (except if layout style is circular). Must be greater than or equal to zero.
UnitCodeRequiredVisUnitCodesThe units for the spacing values.

Return Value



The AlignOrSpace parameter must be one or the combination of both (3) of the following VisLayoutIncrementalType constants.

visLayoutIncrAlign1Align shapes.
visLayoutIncrSpace2Space shapes evenly.

The AlignHorizontal parameter must be one of the following VisLayoutHorzAlignType constants.

visLayoutHorzAlignNone0Do not align horizontally.
visLayoutHorzAlignDefault1Visio chooses how to align horizontally.
visLayoutHorzAlignLeft2Align the left edges of the shapes.
visLayoutHorzAlignCenter3Align the centers of the shapes.
visLayoutHorzAlignRight4Align the right edges of the shapes.

The AlignVertical parameter must be one of the following VisLayoutVertAlignType constants.

visLayoutVertAlignNone0Do not align vertically.
visLayoutVertAlignDefault1Visio chooses how to align vertically.
visLayoutVertAlignTop2Align the top edges of the shapes.
visLayoutVertAlignMiddle3Align the middles of the shapes.
visLayoutVertAlignBottom4Align the bottom edges of the shapes.

If AlignOrSpace is visLayoutIncrAlign , either AlignHorizontal must be a value other than visLayoutHorzAlignNone , or AlignVertical must be a value other than visLayoutVertAlignNone .

If AlignOrSpace is visLayoutIncrSpace , both AlignHorizontal and AlignVertical must be greater than zero.

If AlignOrSpace is a combination of visLayoutIncrAlign and visLayoutIncrSpace , both of these conditions must be true.

If the page layout style is circular, Visio uses only the AlignHorizontal value to determine whether to align, and only the SpaceHorizontal parameter value to determine whether to space, ignoring the AlignVertical and SpaceVertical parameter values, respectively. In this case, if you pass a value other than visLayoutHorzAlignNone for AlignHorizontal , Visio performs the alignment. Similarly, if you pass any value greater than zero for SpaceHorizontal , Visio performs the spacing.

© 2017 Microsoft