# Add-OfficeVisioStencilShape

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

Cmdlet 

Aliases: VisioStencil

**Module**

`PSWriteOffice`

**Aliases**

`VisioStencil`

**Inputs**

`OfficeIMO.Visio.VisioPage`

**Outputs**

`OfficeIMO.Visio.VisioShape`

**Source**

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

Adds a stencil shape to the current Visio page.

## Syntax

```
Add-OfficeVisioStencilShape
[-Alignment <OfficeAlignment>]
[-Angle <Double>]
[-Bold]
[-Catalog <Object>]
[-Color <OfficeColor>]
[-FillColor <OfficeColor>]
[-FillPattern <Int32>]
[-Font <String>]
[-Height <OfficeLength>]
[-Italic]
[-Key <String>]
[-LineColor <OfficeColor>]
[-LinePattern <Int32>]
[-LineWeight <OfficeLength>]
[-Name <String>]
[-NameU <String>]
[-Page <VisioPage>]
[-PassThru]
[-Size <OfficeLength>]
[-Stencil] <String>
[-Strikethrough]
[[-Text] <String>]
[-Underline <Single|Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
```

[#](#member-d42fb691169e06c5d633dc9e)

Parameter set: `Catalog`

```
Add-OfficeVisioStencilShape
[-Alignment <OfficeAlignment>]
[-Angle <Double>]
[-Bold]
-BuiltIn <OfficeVisioBuiltInStencilCatalog>
[-Color <OfficeColor>]
[-FillColor <OfficeColor>]
[-FillPattern <Int32>]
[-Font <String>]
[-Height <OfficeLength>]
[-Italic]
[-Key <String>]
[-LineColor <OfficeColor>]
[-LinePattern <Int32>]
[-LineWeight <OfficeLength>]
[-Name <String>]
[-NameU <String>]
[-Page <VisioPage>]
[-PassThru]
[-Size <OfficeLength>]
[-Stencil] <String>
[-Strikethrough]
[[-Text] <String>]
[-Underline <Single|Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
```

[#](#member-25c08909e074046de6e34bcc)

Parameter set: `BuiltIn`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Automate Visio Diagrams](/docs/pswriteoffice/visio/) Guide
  
  Create, inspect, arrange, stencil, and export VSDX diagrams from PowerShell. Includes PowerShell examples, validation notes, and cmdlet links.
- [Use Visio Stencils and Shape Catalogs](/docs/visio/stencils-and-catalogs/) Guide
  
  Place shapes from OfficeIMO's built-in catalogs or from VSSX and VSTX stencil packs you supply, and keep the link to each shape's master.

## 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

**-Alignment OfficeAlignment optional**

Whole-shape horizontal text alignment.

Possible values: `Left`, `Center`, `Right`, `Justify`, `Start`, `End`

**-Angle Double optional**

Shape angle in degrees.

**-Bold SwitchParameter optional**

Apply bold text; explicit false clears it.

**-Catalog Object optionalsets: Catalog**

A stencil catalog object or a name registered in the current Visio block.

**-Color OfficeColor optional**

Text color, including CSS names and theme roles.

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

**-Font String optional**

Font family for the shape's text.

**-Height OfficeLength optional**

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

**-Italic SwitchParameter optional**

Apply italic text; explicit false clears it.

**-Key String optional**

DSL key used by connector commands.

**-LineColor OfficeColor 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 OfficeLength optional**

Line weight.

**-Name String optional**

Optional shape name.

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

**-Size OfficeLength optional**

Font size; a number means points.

**-Stencil String requiredposition: 0**

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

**-Strikethrough SwitchParameter optional**

Apply one strikethrough line; explicit false clears it.

**-Text String optionalposition: 1**

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

**-Underline OfficeTextDecorationStyle optional**

Native Visio underline variant.

Possible values: `Single`, `Double`

**-Width OfficeLength optional**

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

**-X OfficeLength optional**

X coordinate of the stencil shape center.

**-Y OfficeLength optional**

Y coordinate of the stencil shape center.

**-BuiltIn OfficeVisioBuiltInStencilCatalog requiredsets: 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).

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