# Add-OfficeVisioContainer

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

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: VisioContainer

**Module**

`PSWriteOffice`

**Aliases**

`VisioContainer`

**Inputs**

`System.Object`

**Outputs**

`OfficeIMO.Visio.VisioShape`

**Source**

[AddOfficeVisioContainerCommand.cs:25](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/AddOfficeVisioContainerCommand.cs#L25) 

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

## Syntax

```
Add-OfficeVisioContainer
[-ContainerStyle <Int32>]
[-FillColor <String>]
[-HeadingHeight <Double>]
[-HeadingStyle <Int32>]
-Id <String>
[[-InputObject] <Object>]
[-LineColor <String>]
[-LineWeight <Double>]
[-Locked]
[-Margin <Double>]
[-NoAutoResize]
[-NoHighlight]
[-NoRibbon]
[-Page <VisioPage>]
[-PassThru]
[-ShapeId <String[]>]
[-Text <String>]
[<CommonParameters>]
```

[#](#method-add-officevisiocontainer-int32-string-double-int32-string-object-string-double-switchparameter-double-switchparameter-switchparameter-switchparameter-visiopage-switchparameter-string-string)

Parameter set: `All Parameter Sets`

## Examples

### Group related shapes in a container.

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

Creates a native Visio container around previously keyed shapes.

## Parameters

**-ContainerStyle Int32 optional**

Native Visio container gallery identifier. Zero selects the default/no explicit gallery style.

**-FillColor String optional**

Container fill color.

**-HeadingHeight Double optional**

Additional heading height in page units.

**-HeadingStyle Int32 optional**

Native Visio heading gallery identifier. Zero disables the heading style.

**-Id String required**

Container shape identifier.

**-InputObject Object optionalposition: 0pipeline: True (ByValue)**

Shapes, shape selections, or shape keys/ids to include in the container.

**-LineColor String optional**

Container line color.

**-LineWeight Double optional**

Container line weight in inches.

**-Locked SwitchParameter optional**

Lock the generated container.

**-Margin Double optional**

Outer margin around member shapes in page units.

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

**-Text String optional**

Container heading text.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:C829A11EC7700843DE4DFE157B1E45D25A44F20CD7AFC8A92FCA8BFE69138E9E -->
