API Reference

Cmdlet

Set-OfficeVisioShapeLayout

Aliases: VisioArrange, VisioLayout
Namespace PSWriteOffice
Aliases
VisioArrange VisioLayout
Inputs
System.Object
Outputs
OfficeIMO.Visio.VisioShape

Applies OfficeIMO Visio selection layout and layer operations to shapes.

Remarks

Applies OfficeIMO Visio selection layout and layer operations to shapes.

Examples

Authored help example

Arrange keyed shapes in a horizontal stack.

PS>


New-OfficeVisio -Path .\Layout.vsdx {
                VisioRectangle -Key one -Text 'One'
                VisioRectangle -Key two -Text 'Two'
                VisioLayout -ShapeId one,two -HorizontalStack -HorizontalSpacing 0.4
            }
        

Resolves keyed shapes and applies a reusable OfficeIMO Visio layout operation.

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-OfficeVisioShapeLayout [-AlignHorizontal <Nullable`1>] [-AlignVertical <Nullable`1>] [-Columns <Int32>] [-Distribute <Nullable`1>] [-Grid] [-HorizontalSpacing <Double>] [-HorizontalStack] [-InputObject <Object>] [-Layer <String>] [-NoRouteInternalConnectors] [-Page <VisioPage>] [-PassThru] [-PreserveFirstShapeCenter] [-ShapeId <String[]>] [-VerticalSpacing <Double>] [-VerticalStack] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

AlignHorizontal Nullable`1 optionalposition: namedpipeline: False
Horizontal alignment inside the selected shapes' bounds.
AlignVertical Nullable`1 optionalposition: namedpipeline: False
Vertical alignment inside the selected shapes' bounds.
Columns Int32 optionalposition: namedpipeline: False
Grid column count. Zero lets OfficeIMO choose a near-square grid.
Distribute Nullable`1 optionalposition: namedpipeline: False
Distribute selected shapes along an axis.
Grid SwitchParameter optionalposition: namedpipeline: False
Lay out selected shapes as a grid.
HorizontalSpacing Double optionalposition: namedpipeline: False
Horizontal spacing in inches for grid/stack layout.
HorizontalStack SwitchParameter optionalposition: namedpipeline: False
Lay out selected shapes as a horizontal stack.
InputObject Object optionalposition: 0pipeline: True (ByValue)
Shapes, shape selections, or shape keys/ids to arrange.
Layer String optionalposition: namedpipeline: False
Add selected shapes to this layer.
NoRouteInternalConnectors SwitchParameter optionalposition: namedpipeline: False
Do not reroute internal connectors during OfficeIMO relayout.
Page VisioPage optionalposition: namedpipeline: False
Page that owns the shapes. Optional inside New-OfficeVisio/VisioPage DSL scopes.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit arranged shapes.
PreserveFirstShapeCenter SwitchParameter optionalposition: namedpipeline: False
Use the first selected shape as the grid origin instead of preserving the selection top-left.
ShapeId String[] optionalposition: namedpipeline: False
Shape keys or ids to resolve on the target page.
VerticalSpacing Double optionalposition: namedpipeline: False
Vertical spacing in inches for grid/stack layout.
VerticalStack SwitchParameter optionalposition: namedpipeline: False
Lay out selected shapes as a vertical stack.

Outputs

OfficeIMO.Visio.VisioShape