# Add-OfficeVisioStencilShape

Adds a stencil shape to the current Visio page. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice API Reference.

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

Forks **84**

Open issues **3**

Total downloads **5,231,343**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-23

Cmdlet 

Aliases: VisioStencil

**Module**

`PSWriteOffice`

**Aliases**

`VisioStencil`

**Inputs**

`OfficeIMO.Visio.VisioPage`

**Outputs**

`OfficeIMO.Visio.VisioShape`

**Source**

[AddOfficeVisioStencilShapeCommand.cs:23](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/AddOfficeVisioStencilShapeCommand.cs#L23) 

Adds a stencil shape to the current Visio page.

## Syntax

```
Add-OfficeVisioStencilShape
[-Angle <Double>]
[-Catalog <String>]
[-FillColor <String>]
[-FillPattern <Int32>]
[-Height <Double>]
[-Key <String>]
[-LineColor <String>]
[-LinePattern <Int32>]
[-LineWeight <Double>]
[-NameU <String>]
[-Page <VisioPage>]
[-PassThru]
[-ShapeName <String>]
[-Stencil] <String>
[[-Text] <String>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

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

Parameter set: `CatalogName`

```
Add-OfficeVisioStencilShape
[-Angle <Double>]
-CatalogObject <VisioStencilCatalog>
[-FillColor <String>]
[-FillPattern <Int32>]
[-Height <Double>]
[-Key <String>]
[-LineColor <String>]
[-LinePattern <Int32>]
[-LineWeight <Double>]
[-NameU <String>]
[-Page <VisioPage>]
[-PassThru]
[-ShapeName <String>]
[-Stencil] <String>
[[-Text] <String>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officevisiostencilshape-double-visiostencilcatalog-string-int32-double-string-string-int32-double-string-visiopage-switchparameter-string-string-string-double-double-double)

Parameter set: `CatalogObject`

```
Add-OfficeVisioStencilShape
[-Angle <Double>]
[-BuiltIn <OfficeVisioBuiltInStencilCatalog>]
[-FillColor <String>]
[-FillPattern <Int32>]
[-Height <Double>]
[-Key <String>]
[-LineColor <String>]
[-LinePattern <Int32>]
[-LineWeight <Double>]
[-NameU <String>]
[-Page <VisioPage>]
[-PassThru]
[-ShapeName <String>]
[-Stencil] <String>
[[-Text] <String>]
[-Width <Double>]
[-X <Double>]
[-Y <Double>]
[<CommonParameters>]
```

[#](#method-add-officevisiostencilshape-double-officevisiobuiltinstencilcatalog-string-int32-double-string-string-int32-double-string-visiopage-switchparameter-string-string-string-double-double-double)

Parameter set: `BuiltIn`

## Examples

### Add built-in flowchart stencil shapes.

```powershell
OfficeVisio -Path .\StencilFlow.vsdx -UseMastersByDefault {
    VisioStencilImport -BuiltIn Flowchart -Name Flow -Default
    VisioStencil -Catalog Flow -Stencil process -Key intake -Text 'Intake' -X 1.5 -Y 4
}
```

Registers a built-in catalog and places a stencil shape on the active page.

## Parameters

**-Angle Double optional**

Shape angle in radians.

**-Catalog String optionalaliases: CatalogNamesets: CatalogName**

Catalog previously registered in the active Visio DSL scope.

**-FillColor String optional**

Fill color name or hex value.

**-FillPattern Int32 optional**

Native Visio fill-pattern index: 0 has no fill, 1 is solid, and 2 through 40 select built-in patterns.

**-Height Double optional**

Optional shape height. Omit to use the stencil default height.

**-Key String optional**

DSL key used by connector commands.

**-LineColor String optional**

Line color name or hex value.

**-LinePattern Int32 optional**

Native Visio line-pattern index: 0 hides the line, 1 is solid, and 2 through 23 select built-in patterns.

**-LineWeight Double optional**

Line weight.

**-NameU String optional**

Optional universal shape name.

**-Page VisioPage optionalpipeline: True (ByValue)**

Target page. Optional inside VisioPage or OfficeVisio.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-ShapeName String optional**

Optional shape name.

**-Stencil String requiredposition: 0aliases: Name**

Stencil id, name, master name, keyword, alias, or tag.

**-Text String optionalposition: 1**

Text placed inside the shape. Omit to use the stencil display name.

**-Width Double optional**

Optional shape width. Omit to use the stencil default width.

**-X Double optional**

X coordinate of the stencil shape center.

**-Y Double optional**

Y coordinate of the stencil shape center.

**-CatalogObject VisioStencilCatalog requiredsets: CatalogObject**

Catalog object containing the stencil shape.

**-BuiltIn OfficeVisioBuiltInStencilCatalog optionalsets: BuiltIn**

Built-in OfficeIMO stencil catalog containing the shape.

Possible values: `All`, `BasicShapes`, `Flowchart`, `BlockDiagram`, `Architecture`, `Network`, `Infrastructure`, `Cloud`, `SecurityIdentity`, `ContainersKubernetes`, `DataPlatform`, `CollaborationBusiness`, `Swimlane`, `OrgChart`, `Timeline`, `Sequence`

## 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:81682BBF204EC844FAD622DD9F074579E43F6F511DC474E842ECB09454635E73 -->
