Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Cmdlet

Add-OfficeVisioContainer

Aliases: VisioContainer
Module
PSWriteOffice
Aliases
VisioContainer
Inputs
System.Object
Outputs
OfficeIMO.Visio.VisioShape

Creates an OfficeIMO-authored Visio-native container around existing shapes.

Syntax

Add-OfficeVisioContainer
[-Alignment <OfficeAlignment>]
[-Bold]
[-Color <OfficeColor>]
[-ContainerStyle <Int32>]
[-FillColor <OfficeColor>]
[-Font <String>]
[-HeadingHeight <OfficeLength>]
[-HeadingStyle <Int32>]
[[-InputObject] <Object>]
[-Italic]
-Key <String>
[-LineColor <OfficeColor>]
[-LineWeight <OfficeLength>]
[-Locked]
[-Margin <OfficeLength>]
[-NoAutoResize]
[-NoHighlight]
[-NoRibbon]
[-Page <VisioPage>]
[-PassThru]
[-ShapeId <String[]>]
[-Size <OfficeLength>]
[-Strikethrough]
[-Text <String>]
[-Underline <Single|Double>]
[<CommonParameters>]
#
Parameter set: Page

Examples

Group related shapes in a container.

OfficeVisio -Path .\Architecture.vsdx {
    VisioRectangle -Key api -Text 'API' -X 2 -Y 4
    VisioRectangle -Key worker -Text 'Worker' -X 4 -Y 4
    VisioContainer -Key app -Text 'Application tier' -ShapeId api,worker -FillColor '#F8FAFC'
}

Creates a native Visio container around previously keyed shapes.

Parameters

-Alignment OfficeAlignment optional
Whole-shape horizontal text alignment.
Possible values: Left, Center, Right, Justify, Start, End
-Bold SwitchParameter optional
Apply bold text; explicit false clears it.
-Color OfficeColor optional
Text color, including CSS names and theme roles.
-ContainerStyle Int32 optional
Native Visio container gallery identifier. Zero selects the default/no explicit gallery style.
-FillColor OfficeColor optional
Container fill color.
-Font String optional
Font family for the shape's text.
-HeadingHeight OfficeLength optional
Additional heading height as a physical length; a number means points.
-HeadingStyle Int32 optional
Native Visio heading gallery identifier. Zero disables the heading style.
-InputObject Object optionalposition: 0pipeline: True (ByValue)
Shapes, shape selections, or shape keys/ids to include in the container.
-Italic SwitchParameter optional
Apply italic text; explicit false clears it.
-Key String required
Container shape identifier.
-LineColor OfficeColor optional
Container line color.
-LineWeight OfficeLength optional
Container line weight as a physical length; a number means points.
-Locked SwitchParameter optional
Lock the generated container.
-Margin OfficeLength optional
Outer margin around member shapes as a physical length; a number means points.
-NoAutoResize SwitchParameter optional
Disable Visio container auto resize metadata.
-NoHighlight SwitchParameter optional
Suppress Visio selection highlighting metadata.
-NoRibbon SwitchParameter optional
Suppress Visio container ribbon metadata.
-Page VisioPage optional
Page that owns the member shapes. Optional inside OfficeVisio/VisioPage DSL scopes.
-PassThru SwitchParameter optional
Emit the object created or changed by the command.
-ShapeId String[] optional
Shape keys or ids to include in the container.
-Size OfficeLength optional
Font size; a number means points.
-Strikethrough SwitchParameter optional
Apply one strikethrough line; explicit false clears it.
-Text String optional
Container heading text.
-Underline OfficeTextDecorationStyle optional
Native Visio underline variant.
Possible values: Single, Double

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.