# Add-OfficeVisioConnector

Adds a connector between two Visio shapes. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteOffice Cmdlet Reference.

Cmdlet 

Aliases: VisioConnector

**Module**

`PSWriteOffice`

**Aliases**

`VisioConnector`

**Inputs**

`OfficeIMO.Visio.VisioPage`

**Outputs**

`OfficeIMO.Visio.VisioConnector`

**Source**

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

Adds a connector between two Visio shapes.

## Syntax

```
Add-OfficeVisioConnector
[-BeginArrow <Arrow|Triangle>]
[-EndArrow <Arrow|Triangle>]
-From <Object>
[-FromSide <Auto|Left|Right|Bottom|Top>]
[-Kind <Straight|RightAngle|Curved|Dynamic>]
[-Label <String>]
[-LineColor <OfficeColor>]
[-LinePattern <Int32>]
[-LineWeight <OfficeLength>]
[-Page <VisioPage>]
[-PassThru]
-To <Object>
[-ToSide <Auto|Left|Right|Bottom|Top>]
[<CommonParameters>]
```

[#](#method-add-officevisioconnector-endarrow-endarrow-object-visioside-connectorkind-string-officecolor-int32-officelength-visiopage-switchparameter-object-visioside)

Parameter set: `Page`

## 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.
- [Create, Edit, and Export Visio Diagrams](/docs/visio/) Guide
  
  OfficeIMO.Visio creates, edits, validates and exports VSDX diagrams in .NET without Microsoft Visio, with builders for common diagram types.

## Examples

### Connect two keyed shapes.

```powershell
OfficeVisio -Path .\Flow.vsdx {
    VisioRectangle -Key source -Text 'Source' -X 1 -Y 4
    VisioRectangle -Key target -Text 'Target' -X 4 -Y 4
    VisioConnector -From source -To target -Kind RightAngle -EndArrow Triangle -Label 'sync'
}
```

Adds a routed connector between shapes registered in the current DSL scope.

## Parameters

**-BeginArrow EndArrow optional**

Begin arrow style.

Possible values: `Arrow`, `Triangle`

**-EndArrow EndArrow optional**

End arrow style.

Possible values: `Arrow`, `Triangle`

**-From Object required**

Source shape object or a registered key, id or name.

**-FromSide VisioSide optional**

Preferred source shape side.

Possible values: `Auto`, `Left`, `Right`, `Bottom`, `Top`

**-Kind ConnectorKind optional**

Connector kind.

Possible values: `Straight`, `RightAngle`, `Curved`, `Dynamic`

**-Label String optional**

Connector label.

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

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

Target page. Optional inside VisioPage or OfficeVisio.

**-PassThru SwitchParameter optional**

Emit the object created or changed by the command.

**-To Object required**

Target shape object or a registered key, id or name.

**-ToSide VisioSide optional**

Preferred target shape side.

Possible values: `Auto`, `Left`, `Right`, `Bottom`, `Top`

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