Cmdlet
Add-OfficeVisioRectangle
Adds a rectangle shape to the current Visio page.
Syntax
Add-OfficeVisioRectangle
[-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>]#Parameter set:
PageExamples
Add a labeled process box.
New-OfficeVisio -Path .\Flow.vsdx {
VisioRectangle -Key intake -Text 'Intake' -X 1.5in -Y 4in -Width 1.7in -Height 0.8in -FillColor '#E0F2FE'
}Adds a rectangle and registers a key for later connector commands.
Parameters
- -Alignment OfficeAlignment
- Whole-shape horizontal text alignment.
- Possible values:
Left,Center,Right,Justify,Start,End - -Angle Double
- Rotation in degrees.
- -Bold SwitchParameter
- Apply bold text; explicit false clears it.
- -Color OfficeColor
- Text color, including CSS names and theme roles.
- -FillColor OfficeColor
- Fill color or semantic role resolved through the default Office theme.
- -FillPattern Int32
- Native fill pattern: 0 has no fill, 1 is solid, and 2 through 40 select built-in patterns.
- -Font String
- Font family for the shape's text.
- -Height OfficeLength
- Physical shape height.
- -Italic SwitchParameter
- Apply italic text; explicit false clears it.
- -Key String
- Key used by connector and layout commands within the block.
- -LineColor OfficeColor
- Line color or semantic role resolved through the default Office theme.
- -LinePattern Int32
- Native line pattern: 0 hides the line, 1 is solid, and 2 through 23 select built-in patterns.
- -LineWeight OfficeLength
- Physical outline weight.
- -Name String
- Optional shape name; otherwise Key is used.
- -NameU String
- Optional universal shape name.
- -Page VisioPage
- Target page; the current page is used inside a Visio content block.
- -PassThru SwitchParameter
- Emit the object created or changed by the command.
- -Size OfficeLength
- Font size; a number means points.
- -Strikethrough SwitchParameter
- Apply one strikethrough line; explicit false clears it.
- -Text String
- Text placed inside the shape.
- -Underline OfficeTextDecorationStyle
- Native Visio underline variant.
- Possible values:
Single,Double - -Width OfficeLength
- Physical shape width.
- -X OfficeLength
- Shape pin's X coordinate. A number means points.
- -Y OfficeLength
- 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.