# Add-OfficeVisioDiamond

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

Cmdlet 

Aliases: VisioDiamond

**Module**

`PSWriteOffice`

**Aliases**

`VisioDiamond`

**Inputs**

`OfficeIMO.Visio.VisioPage`

**Outputs**

`OfficeIMO.Visio.VisioShape`

**Source**

[AddOfficeVisioDiamondCommand.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Visio/AddOfficeVisioDiamondCommand.cs#L18) 

Adds a diamond shape to the current Visio page.

## Syntax

```
Add-OfficeVisioDiamond
[-Alignment <OfficeAlignment>]
[-Angle <Double>]
[-Bold]
[-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>]
[-Strikethrough]
[[-Text] <String>]
[-Underline <Single|Double>]
[-Width <OfficeLength>]
[-X <OfficeLength>]
[-Y <OfficeLength>]
[<CommonParameters>]
```

[#](#member-d577aa2d1a3e56f2904ac0e3)

Parameter set: `Page`

## Examples

### Add a decision shape.

```powershell
New-OfficeVisio -Path .\Flow.vsdx {
    VisioDiamond -Key review -Text 'Approved?' -X 4in -Y 4in -Width 1.2in -Height 1in -FillColor '#FEF3C7'
}
```

Adds a decision diamond to the active Visio page.

## Parameters

**-Alignment OfficeAlignment optional**

Whole-shape horizontal text alignment.

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

**-Angle Double optional**

Rotation in degrees.

**-Bold SwitchParameter optional**

Apply bold text; explicit false clears it.

**-Color OfficeColor optional**

Text color, including CSS names and theme roles.

**-FillColor OfficeColor optional**

Fill color or semantic role resolved through the default Office theme.

**-FillPattern Int32 optional**

Native fill pattern: 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**

Physical shape height.

**-Italic SwitchParameter optional**

Apply italic text; explicit false clears it.

**-Key String optional**

Key used by connector and layout commands within the block.

**-LineColor OfficeColor optional**

Line color or semantic role resolved through the default Office theme.

**-LinePattern Int32 optional**

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

**-LineWeight OfficeLength optional**

Physical outline weight.

**-Name String optional**

Optional shape name; otherwise Key is used.

**-NameU String optional**

Optional universal shape name.

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

Target page; the current page is used inside a Visio content block.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-Size OfficeLength optional**

Font size; a number means points.

**-Strikethrough SwitchParameter optional**

Apply one strikethrough line; explicit false clears it.

**-Text String optionalposition: 0**

Text placed inside the shape.

**-Underline OfficeTextDecorationStyle optional**

Native Visio underline variant.

Possible values: `Single`, `Double`

**-Width OfficeLength optional**

Physical shape width.

**-X OfficeLength optional**

Shape pin's X coordinate. A number means points.

**-Y OfficeLength optional**

Shape pin's Y coordinate. A number means points.

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