# New-DiagramLink

Creates a new diagram link between two nodes. Review available syntax, parameters, pipeline guidance, and reference details in PSWriteHTML API Reference.

Project

PSWriteHTML

Generate HTML reports, dashboards, and emails from PowerShell without writing HTML, CSS, or JavaScript.

[View on GitHub](https://github.com/EvotecIT/PSWriteHTML) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteHTML/releases/tag/v1.41.0) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteHTML/1.40.0)

Stars **1,025**

Forks **114**

Open issues 

PowerShell Gallery downloads **7,576,901**

Release **v1.45.0**

Language: PowerShell Updated: 2026-11-19

Command 

**Module**

`PSWriteHTML`

Creates a new diagram link between two nodes.

## Syntax

```
New-DiagramLink
[-ArrowsFromEnabled]
[[-ArrowsFromScaleFactor] <Nullable`1>]
[[-ArrowsFromType] <arrow|bar|circle>]
[-ArrowsMiddleEnabled]
[[-ArrowsMiddleScaleFactor] <Nullable`1>]
[[-ArrowsMiddleType] <arrow|bar|circle>]
[-ArrowsToEnabled]
[[-ArrowsToScaleFacto] <Nullable`1>]
[[-ArrowsToType] <arrow|bar|circle>]
[-ArrowStrikethrough]
[-Chosen]
[[-Color] <String>]
[[-ColorHighlight] <String>]
[[-ColorHover] <String>]
[[-ColorInherit] <true|false|from|to|both>]
[[-ColorOpacity] <Nullable`1>]
[-Dashes]
[[-FontAlign] <horizontal|top|middle|bottom>]
[[-FontBackground] <String>]
[[-FontColor] <String>]
[[-FontMulti] <false|true|markdown|html>]
[[-FontName] <String>]
[[-FontSize] <Object>]
[[-FontStrokeColor] <String>]
[[-FontStrokeWidth] <Object>]
[[-FontVAdjust] <Nullable`1>]
[[-From] <String[]>]
[[-Label] <String>]
[[-Length] <String>]
[[-SmoothForceDirection] <horizontal|vertical>]
[[-SmoothRoundness] <String>]
[[-SmoothType] <String>]
[[-To] <String[]>]
[[-WidthConstraint] <Nullable`1>]
[<CommonParameters>]
```

[#](#member-93fb1f9aa32a3db97cdea6a0)

Parameter set: `All Parameter Sets`

## Description

Creates a new diagram link connecting two nodes in a visual representation.

## Examples

### Example 1

```powershell
An example of creating a new diagram link.
```

## Parameters

**-ArrowsFromEnabled SwitchParameter optional**

Switch parameter to enable arrows at the start of the link.

**-ArrowsFromScaleFactor Nullable<T> optionalposition: 7**

Specifies the scale factor for the arrows at the start of the link.

**-ArrowsFromType String optionalposition: 8**

Specifies the type of arrows at the start of the link. Valid values are 'arrow', 'bar', or 'circle'.

Possible values: `arrow`, `bar`, `circle`

**-ArrowsMiddleEnabled SwitchParameter optional**

Switch parameter to enable arrows in the middle of the link.

**-ArrowsMiddleScaleFactor Nullable<T> optionalposition: 5**

Specifies the scale factor for the arrows in the middle of the link.

**-ArrowsMiddleType String optionalposition: 6**

Specifies the type of arrows in the middle of the link. Valid values are 'arrow', 'bar', or 'circle'.

Possible values: `arrow`, `bar`, `circle`

**-ArrowsToEnabled SwitchParameter optional**

Switch parameter to enable arrows at the end of the link.

**-ArrowsToScaleFacto Nullable<T> optionalposition: 3**

**-ArrowsToType String optionalposition: 4**

Specifies the type of arrows at the end of the link. Valid values are 'arrow', 'bar', or 'circle'.

Possible values: `arrow`, `bar`, `circle`

**-ArrowStrikethrough SwitchParameter optional**

Switch parameter to enable a strikethrough effect for the link.

**-Chosen SwitchParameter optional**

Switch parameter to mark the link as chosen.

**-Color String optionalposition: 9**

Specifies the color of the link.

**-ColorHighlight String optionalposition: 10**

Specifies the highlight color of the link.

**-ColorHover String optionalposition: 11**

Specifies the hover color of the link.

**-ColorInherit String optionalposition: 12**

Specifies how the link color should inherit. Valid values are 'true', 'false', 'from', 'to', or 'both'.

Possible values: `true`, `false`, `from`, `to`, `both`

**-ColorOpacity Nullable<T> optionalposition: 13**

Specifies the opacity of the link color. Range between 0 and 1.

**-Dashes SwitchParameter optional**

Switch parameter to enable dashed line style for the link.

**-FontAlign String optionalposition: 21**

Possible options: 'horizontal','top','middle','bottom'. The alignment determines how the label is aligned over the edge. The default value horizontal aligns the label horizontally, regardless of the orientation of the edge. When an option other than horizontal is chosen, the label will align itself according to the edge.

Possible values: `horizontal`, `top`, `middle`, `bottom`

**-FontBackground String optionalposition: 18**

Specifies the background color for the font.

**-FontColor String optionalposition: 15**

Specifies the font color for the label.

**-FontMulti String optionalposition: 22**

Specifies whether the label supports multiple lines or markdown/html formatting.

Possible values: `false`, `true`, `markdown`, `html`

**-FontName String optionalposition: 17**

Specifies the font name for the label.

**-FontSize Object optionalposition: 16**

Specifies the font size for the label.

**-FontStrokeColor String optionalposition: 20**

Specifies the stroke color for the font.

**-FontStrokeWidth Object optionalposition: 19**

Specifies the stroke width for the font. (in pixels)

**-FontVAdjust Nullable<T> optionalposition: 23**

Specifies the vertical adjustment for the label.

**-From String[] optionalposition: 0**

Specifies the starting node of the link.

**-Label String optionalposition: 2**

Specifies the label text for the link.

**-Length String optionalposition: 14**

Specifies the length of the link.

**-SmoothForceDirection String optionalposition: 26**

Accepted options: ['horizontal', 'vertical', 'none']. This options is only used with the cubicBezier curves. When true, horizontal is chosen, when false, the direction that is larger (x distance between nodes vs y distance between nodes) is used. If the x distance is larger, horizontal. This is ment to be used with hierarchical layouts.

Possible values: `horizontal`, `vertical`

**-SmoothRoundness String optionalposition: 27**

Accepted range: 0 .. 1.0. This parameter tweaks the roundness of the smooth curves for all types EXCEPT dynamic.

**-SmoothType String optionalposition: 25**

Possible options: 'dynamic', 'continuous', 'discrete', 'diagonalCross', 'straightCross', 'horizontal', 'vertical', 'curvedCW', 'curvedCCW', 'cubicBezier'. Take a look at this example to see what these look like and pick the one that you like best! When using dynamic, the edges will have an invisible support node guiding the shape. This node is part of the physics simulation.

Possible values: `dynamic`, `continuous`, `discrete`, `diagonalCross`, `straightCross`, `horizontal`, `vertical`, `curvedCW`, `curvedCCW`, `cubicBezier`

**-To String[] optionalposition: 1**

Specifies the ending node of the link.

**-WidthConstraint Nullable<T> optionalposition: 24**

Specifies the width constraint for the link.

## 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:944C1263E200439C8683838E86CE3C5B0D6000D2BE80ADDF6D3217DC982C12E0 -->
