Cmdlet
New-OfficeVisio
Creates a new OfficeIMO.Visio document with an initial page and optional DSL content.
Syntax
New-OfficeVisio
[-Author <String>]
[[-Content] <ScriptBlock>]
[-Height <Double>]
[-NoSave]
[-Open]
[-PageName <String>]
[-PassThru]
[-Path] <String>
[-RequestRecalcOnOpen]
[-Title <String>]
[-Unit <Inches| Centimeters| Millimeters>]
[-UseMastersByDefault]
[-Width <Double>]
[<CommonParameters>]#Parameter set:
All Parameter SetsExamples
Create a simple service map.
OfficeVisio -Path .\ServiceMap.vsdx -Title 'Service map' -RequestRecalcOnOpen {
VisioRectangle -Key web -Text 'Web' -X 1 -Y 4 -FillColor LightBlue
VisioRectangle -Key api -Text 'API' -X 4 -Y 4 -FillColor LightGreen
VisioConnector -From web -To api -EndArrow Triangle -Label 'calls'
}Creates an editable .vsdx diagram with two shapes and a connector.
Parameters
- Optional document author.
- -Content ScriptBlock
- DSL script block describing Visio pages, shapes, and connectors.
- -Height Double
- Initial page height.
- -NoSave SwitchParameter
- Skip saving and emit the document object.
- -Open SwitchParameter
- Open the document after saving.
- -PageName String
- Initial page name.
- -PassThru SwitchParameter
- Emit the document object instead of the saved file.
- -Path String
- Destination .vsdx path.
- -RequestRecalcOnOpen SwitchParameter
- Ask Visio to recalculate layout and connector routing when the document opens.
- -Title String
- Optional document title.
- -Unit VisioMeasurementUnit
- Measurement unit for page width and height.
- Possible values:
Inches,Centimeters,Millimeters - -UseMastersByDefault SwitchParameter
- Use Visio masters for supported built-in stencil shapes when saving.
- -Width Double
- Initial page width.
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.