Skip to content

Add-DiaHorizontalLine

SYNOPSIS

Creates a customizable horizontal line between two nodes in a diagram. Example:

Text Only
(HStart)o-----------------o(Hend)

SYNTAX

__AllParameterSets

Text Only
Add-DiaHorizontalLine [[-HStart] <string>] [[-HEnd] <string>] [[-Arrowtail] <string>]
 [[-Arrowhead] <string>] [[-LineStyle] <string>] [[-HStartLineLength] <int>] [[-LineWidth] <int>]
 [[-LineColor] <string>] [[-IconDebug] <bool>] [<CommonParameters>]

ALIASES

This cmdlet has the following aliases,

  • None

DESCRIPTION

The Add-DiaHorizontalLine function generates a horizontal line between two specified nodes, allowing for extensive customization of the line's appearance. You can specify the start and end node names, arrow styles at both ends, line style, length, width, and color. The function is designed for use with diagramming tools (such as Graphviz) and supports debug mode for visual troubleshooting.

EXAMPLES

EXAMPLE 1

PowerShell
# Creates a dashed blue horizontal line from NodeA to NodeB with a normal arrowhead at the end.
Add-DiaHorizontalLine -HStart "NodeA" -HEnd "NodeB" -LineStyle "dashed" -LineColor "blue" -Arrowhead "normal" -LineWidth 2 -HStartLineLength 2

Example

PARAMETERS

-Arrowhead

The arrow style at the end of the line. Accepts values such as 'none', 'normal', 'inv', 'dot', etc. Default is 'none'.

YAML
Type: System.String
DefaultValue: none
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 3
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-Arrowtail

The arrow style at the start of the line. Accepts values such as 'none', 'normal', 'inv', 'dot', etc. Default is 'none'.

YAML
Type: System.String
DefaultValue: none
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-HEnd

The name of the end node for the horizontal line. Default is 'HEnd'.

YAML
Type: System.String
DefaultValue: HEnd
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-HStart

The name of the start node for the horizontal line. Default is 'HStart'.

YAML
Type: System.String
DefaultValue: HStart
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 0
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-HStartLineLength

The minimum length of the line (minlen). Valid range is 1 to 10. Default is 1.

YAML
Type: System.Int32
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 5
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-IconDebug

Switch to enable debug mode, which highlights the nodes and line in red for troubleshooting. Alias: DraftMode. Default is $false.

YAML
Type: System.Boolean
DefaultValue: False
SupportsWildcards: false
Aliases:
- DraftMode
ParameterSets:
- Name: (All)
  Position: 8
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-LineColor

The color of the line. Default is 'black'. Refer to https://graphviz.org/doc/info/colors.html for supported color names.

YAML
Type: System.String
DefaultValue: black
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 7
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-LineStyle

The style of the line. Valid values are 'dashed', 'dotted', 'solid', 'bold', 'invis', 'filled', 'tapered'. Default is 'solid'.

YAML
Type: System.String
DefaultValue: solid
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 4
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

-LineWidth

The width of the line (penwidth). Valid range is 1 to 10. Default is 1.

YAML
Type: System.Int32
DefaultValue: 1
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 6
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

A string representing the horizontal line in Graphviz DOT format.

NOTES

Text Only
Author: Jonathan Colon
Version: 0.2.31
GitHub: https://github.com/rebelinux/Diagrammer.Core

Diagrammer.Core