API Reference
Cmdlet
Add-OfficeVisioRectangle
Adds a rectangle shape to the current Visio page.
Remarks
Adds a rectangle shape to the current Visio page.
Examples
Add a labeled process box.
PS>
OfficeVisio -Path .\Flow.vsdx {
VisioRectangle -Key intake -Text 'Intake' -X 1.5 -Y 4 -Width 1.7 -Height 0.8 -FillColor '#E0F2FE'
}
Adds a rectangle and registers a key for later connector commands.
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.
Syntax
Add-OfficeVisioRectangle [-Angle <Double>] [-FillColor <String>] [-FillPattern <Int32>] [-Height <Double>] [-Key <String>] [-LineColor <String>] [-LinePattern <Int32>] [-LineWeight <Double>] [-Name <String>] [-NameU <String>] [-Page <VisioPage>] [-PassThru] [-Text <String>] [-Unit <Inches|Centimeters|Millimeters>] [-Width <Double>] [-X <Double>] [-Y <Double>] [<CommonParameters>]#Parameter set:
All Parameter SetsParameters
- Angle Double
- Shape angle in radians.
- FillColor String
- Fill color name or hex value.
- FillPattern Int32
- Native Visio fill-pattern index: 0 has no fill, 1 is solid, and 2 through 40 select built-in patterns.
- Height Double
- Shape height.
- Key String
- DSL key used by connector commands.
- LineColor String
- Line color name or hex value.
- LinePattern Int32
- Native Visio line-pattern index: 0 hides the line, 1 is solid, and 2 through 23 select built-in patterns.
- LineWeight Double
- Line weight.
- Name String
- Optional shape name.
- NameU String
- Optional universal shape name.
- Page VisioPage
- Target page. Optional inside VisioPage or OfficeVisio.
- PassThru SwitchParameter
- Emit the object created or changed by the command.
- Text String
- Text placed inside the shape.
- Unit VisioMeasurementUnit
- Measurement unit for coordinates and dimensions.
- Possible values:
Inches,Centimeters,Millimeters - Width Double
- Shape width.
- X Double
- X coordinate of the shape origin.
- Y Double
- Y coordinate of the shape origin.
Outputs
OfficeIMO.Visio.VisioShape