Cmdlet
Set-OfficeVisioShapeLayout
Applies OfficeIMO Visio selection layout and layer operations to shapes.
Syntax
Set-OfficeVisioShapeLayout
[-Distribute <Horizontal| Vertical>]
[-HorizontalAlignment <Left| Center| Right>]
[[-InputObject] <Object>]
[-Layer <String>]
[-Page <VisioPage>]
[-PassThru]
[-ShapeId <String[]>]
[-VerticalAlignment <Bottom| Middle| Top>]
[<CommonParameters>]#Parameter set:
AlignmentSet-OfficeVisioShapeLayout
[-Columns <Int32>]
-Grid
[-HorizontalSpacing <OfficeLength>]
[[-InputObject] <Object>]
[-Layer <String>]
[-NoRouteInternalConnectors]
[-Page <VisioPage>]
[-PassThru]
[-PreserveFirstShapeCenter]
[-ShapeId <String[]>]
[-VerticalSpacing <OfficeLength>]
[<CommonParameters>]#Parameter set:
GridSet-OfficeVisioShapeLayout
[-HorizontalSpacing <OfficeLength>]
-HorizontalStack
[[-InputObject] <Object>]
[-Layer <String>]
[-NoRouteInternalConnectors]
[-Page <VisioPage>]
[-PassThru]
[-ShapeId <String[]>]
[<CommonParameters>]#Parameter set:
HorizontalStackSet-OfficeVisioShapeLayout
[[-InputObject] <Object>]
[-Layer <String>]
[-NoRouteInternalConnectors]
[-Page <VisioPage>]
[-PassThru]
[-ShapeId <String[]>]
[-VerticalSpacing <OfficeLength>]
-VerticalStack
[<CommonParameters>]#Parameter set:
VerticalStackExamples
Arrange keyed shapes in a horizontal stack.
OfficeVisio -Path .\Layout.vsdx {
VisioRectangle -Key one -Text 'One'
VisioRectangle -Key two -Text 'Two'
VisioLayout -ShapeId one,two -HorizontalStack -HorizontalSpacing 0.4in
}Resolves keyed shapes and applies a reusable OfficeIMO Visio layout operation.
Parameters
- -Distribute VisioDistributionAxis
- Distribute selected shapes along an axis.
- Possible values:
Horizontal,Vertical - -HorizontalAlignment VisioHorizontalAlignment
- Horizontal alignment inside the selected shapes' bounds.
- Possible values:
Left,Center,Right - -InputObject Object
- Shapes, shape selections, or shape keys/ids to arrange.
- -Layer String
- Add selected shapes to this layer.
- -Page VisioPage
- Page that owns the shapes. Optional inside OfficeVisio/VisioPage DSL scopes.
- -PassThru SwitchParameter
- Emit arranged shapes.
- -ShapeId String[]
- Shape keys or ids to resolve on the target page.
- -VerticalAlignment VisioVerticalAlignment
- Vertical alignment inside the selected shapes' bounds.
- Possible values:
Bottom,Middle,Top - -Columns Int32
- Grid column count. Zero lets OfficeIMO choose a near-square grid.
- -Grid SwitchParameter
- Lay out selected shapes as a grid.
- -HorizontalSpacing OfficeLength
- Horizontal spacing; a number means points for grid/stack layout.
- -NoRouteInternalConnectors SwitchParameter
- Do not reroute internal connectors during OfficeIMO relayout.
- -PreserveFirstShapeCenter SwitchParameter
- Use the first selected shape as the grid origin instead of preserving the selection top-left.
- -VerticalSpacing OfficeLength
- Vertical spacing; a number means points for grid/stack layout.
- -HorizontalStack SwitchParameter
- Lay out selected shapes as a horizontal stack.
- -VerticalStack SwitchParameter
- Lay out selected shapes as a vertical stack.
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.