API Reference

Cmdlet

New-OfficeVisio

Aliases: VisioNew
Namespace PSWriteOffice
Aliases
VisioNew
Inputs
None
Outputs
OfficeIMO.Visio.VisioDocument System.IO.FileInfo

Creates a new OfficeIMO.Visio document with an initial page and optional DSL content.

Remarks

Creates a new OfficeIMO.Visio document with an initial page and optional DSL content.

Examples

Authored help example

Create a simple service map.

PS>


New-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.

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

New-OfficeVisio [-Author <String>] [-Content <ScriptBlock>] [-Height <Double>] [-NoSave] [-PageName <String>] [-PassThru] -Path <String> [-RequestRecalcOnOpen] [-Show] [-Title <String>] [-Unit <Inches|Centimeters|Millimeters>] [-UseMastersByDefault] [-Width <Double>] [<CommonParameters>]
#
Parameter set: All Parameter Sets

Parameters

Author String optionalposition: namedpipeline: False
Optional document author.
Content ScriptBlock optionalposition: 1pipeline: False
DSL script block describing Visio pages, shapes, and connectors.
Height Double optionalposition: namedpipeline: False
Initial page height.
NoSave SwitchParameter optionalposition: namedpipeline: False
Skip saving and emit the document object.
PageName String optionalposition: namedpipeline: False
Initial page name.
PassThru SwitchParameter optionalposition: namedpipeline: False
Emit the document object instead of the saved file.
Path String requiredposition: 0pipeline: Falsealiases: FilePath
Destination .vsdx path.
RequestRecalcOnOpen SwitchParameter optionalposition: namedpipeline: False
Ask Visio to recalculate layout and connector routing when the document opens.
Show SwitchParameter optionalposition: namedpipeline: False
Open the document after saving.
Title String optionalposition: namedpipeline: False
Optional document title.
Unit VisioMeasurementUnit optionalposition: namedpipeline: Falsevalues: 3
Measurement unit for page width and height.
Possible values: Inches, Centimeters, Millimeters
UseMastersByDefault SwitchParameter optionalposition: namedpipeline: False
Use Visio masters for supported built-in stencil shapes when saving.
Width Double optionalposition: namedpipeline: False
Initial page width.

Outputs

OfficeIMO.Visio.VisioDocument System.IO.FileInfo