Selection.LayoutIncremental Method (Visio)

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

Version Information

Version Added: Visio 2010

Syntax

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

expression A variable that represents a Selection object.

Parameters

Name Required/Optional Data Type Description

AlignOrSpace

Required

VisLayoutIncrementalType

The type of incremental layout action to perform (alignment, spacing, or both). See Remarks for possible values.

AlignHorizontal

Required

VisLayoutHorzAlignType

Indicates how Microsoft Visio aligns shapes horizontally when it aligns incrementally. See Remarks for possible values.

AlignVertical

Required

VisLayoutVertAlignType

Indicates how Visio aligns shapes vertically when it aligns incrementally (except if layout style is circular). See Remarks for possible values.

SpaceHorizontal

Required

Double

The edge-to-edge horizontal spacing. Must be greater than or equal to zero.

SpaceVertical

Required

Double

The edge-to-edge vertical spacing (except if layout style is circular). Must be greater than or equal to zero.

UnitCode

Required

VisUnitCodes

The units for the spacing values.

Return Value

Nothing

Remarks

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

Constant Value Description

visLayoutIncrAlign

1

Align shapes.

visLayoutIncrSpace

2

Space shapes evenly.

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

Constant Value Description

visLayoutHorzAlignNone

0

Do not align horizontally.

visLayoutHorzAlignDefault

1

Visio chooses how to align horizontally.

visLayoutHorzAlignLeft

2

Align the left edges of the shapes.

visLayoutHorzAlignCenter

3

Align the centers of the shapes.

visLayoutHorzAlignRight

4

Align the right edges of the shapes.

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

Constant Value Description

visLayoutVertAlignNone

0

Do not align vertically.

visLayoutVertAlignDefault

1

Visio chooses how to align vertically.

visLayoutVertAlignTop

2

Align the top edges of the shapes.

visLayoutVertAlignMiddle

3

Align the middles of the shapes.

visLayoutVertAlignBottom

4

Align 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.

Community Additions

ADD
Show:
© 2014 Microsoft