# Import-OfficeVisioStencil

Registers a stencil catalog with the active Visio DSL scope.

Project

PSWriteOffice

PowerShell document automation across OfficeIMO's document, spreadsheet, presentation, PDF, Project, Access, EPUB, invoicing, and conversion engines.

[View on GitHub](https://github.com/EvotecIT/OfficeIMO/tree/master/PowerShell/PSWriteOffice) [Visit Website](#) [Releases](https://github.com/EvotecIT/PSWriteOffice/releases/tag/v3.0.5) [Changelog](#) [Get package](https://www.powershellgallery.com/packages/PSWriteOffice/0.2.0)

Stars **727**

Forks **84**

Open issues **7**

Total downloads **5,275,783**

Release **OfficeIMO-v3.6.2**

Language: C# Updated: 2026-11-24

Cmdlet 

Aliases: Import-VisioStencil, VisioStencilImport

**Module**

`PSWriteOffice`

**Aliases**

`Import-VisioStencil` `VisioStencilImport`

**Inputs**

`OfficeIMO.Visio.Stencils.VisioStencilCatalog`

**Outputs**

`OfficeIMO.Visio.Stencils.VisioStencilCatalog`

**Source**

[ImportOfficeVisioStencilCommand.cs:20](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/ImportOfficeVisioStencilCommand.cs#L20) 

Registers a stencil catalog with the active Visio DSL scope.

## Syntax

```
Import-OfficeVisioStencil
-Catalog <VisioStencilCatalog>
[-Default]
[-Name <String>]
[<CommonParameters>]
```

[#](#method-import-officevisiostencil-visiostencilcatalog-switchparameter-string)

Parameter set: `Catalog`

```
Import-OfficeVisioStencil
-BuiltIn <OfficeVisioBuiltInStencilCatalog>
[-Default]
[-Name <String>]
[<CommonParameters>]
```

[#](#method-import-officevisiostencil-officevisiobuiltinstencilcatalog-switchparameter-string)

Parameter set: `BuiltIn`

```
Import-OfficeVisioStencil
[-Category <String>]
[-Default]
[-DefaultHeight <Double>]
[-DefaultWidth <Double>]
[-IdPrefix <String>]
[-IncludeUnsupportedMasters]
[-LoadCatalogName <String>]
[-MasterName <String[]>]
[-Name <String>]
[-NoConnectionPointMetadata]
[-NoLearnMasterDimensions]
[-NoPreviewImageMetadata]
[-Path] <String[]>
[-Recurse]
[<CommonParameters>]
```

[#](#method-import-officevisiostencil-string-switchparameter-double-double-string-switchparameter-string-string-string-switchparameter-switchparameter-switchparameter-string-switchparameter)

Parameter set: `Path`

```
Import-OfficeVisioStencil
[-Category <String>]
[-Default]
[-DefaultHeight <Double>]
[-DefaultWidth <Double>]
[-IdPrefix <String>]
[-IncludeUnsupportedMasters]
-Installed
[-LoadCatalogName <String>]
[-MasterName <String[]>]
[-Name <String>]
[-NoConnectionPointMetadata]
[-NoLearnMasterDimensions]
[-NoPreviewImageMetadata]
[<CommonParameters>]
```

[#](#method-import-officevisiostencil-string-switchparameter-double-double-string-switchparameter-switchparameter-string-string-string-switchparameter-switchparameter-switchparameter)

Parameter set: `Installed`

## Examples

### Register a catalog for DSL use.

```powershell
OfficeVisio -Path .\Flow.vsdx -UseMastersByDefault {
    VisioStencilImport -BuiltIn Flowchart -Name Flow -Default
    VisioStencil -Stencil process -Key step -Text 'Step' -X 2 -Y 4
}
```

Registers the flowchart catalog and makes it the default for later VisioStencil calls.

## Parameters

**-Catalog VisioStencilCatalog requiredpipeline: True (ByValue)sets: Catalog**

Catalog object to register.

**-Default SwitchParameter optional**

Make this catalog the default for later VisioStencil calls.

**-Name String optionalaliases: CatalogName, Key**

Name used by VisioStencil -Catalog in the DSL.

**-BuiltIn OfficeVisioBuiltInStencilCatalog requiredsets: BuiltIn**

Built-in OfficeIMO stencil catalog to register.

Possible values: `All`, `BasicShapes`, `Flowchart`, `BlockDiagram`, `Architecture`, `Network`, `Infrastructure`, `Cloud`, `SecurityIdentity`, `ContainersKubernetes`, `DataPlatform`, `CollaborationBusiness`, `Swimlane`, `OrgChart`, `Timeline`, `Sequence`

**-Category String optionalsets: Path, Installed**

Category assigned to package-backed stencil shapes.

**-DefaultHeight Double optionalsets: Path, Installed**

Default height for package-backed stencils when dimensions cannot be learned.

**-DefaultWidth Double optionalsets: Path, Installed**

Default width for package-backed stencils when dimensions cannot be learned.

**-IdPrefix String optionalsets: Path, Installed**

Stable id prefix for package-backed stencil shapes.

**-IncludeUnsupportedMasters SwitchParameter optionalsets: Path, Installed**

Include unsupported package masters as generic generated masters.

**-LoadCatalogName String optionalsets: Path, Installed**

Catalog display name when loading package metadata.

**-MasterName String[] optionalsets: Path, Installed**

Optional master filters for package-backed catalogs.

**-NoConnectionPointMetadata SwitchParameter optionalsets: Path, Installed**

Skip reading source connection point metadata from package master parts.

**-NoLearnMasterDimensions SwitchParameter optionalsets: Path, Installed**

Skip reading master dimensions from package master parts.

**-NoPreviewImageMetadata SwitchParameter optionalsets: Path, Installed**

Skip reading preview image relationship metadata from package master parts.

**-Path String[] requiredposition: 0aliases: FilePath, LiteralPathsets: Path**

Visio package, package directory, or OfficeIMO native stencil manifest path to load and register.

**-Recurse SwitchParameter optionalsets: Path**

Search directories recursively.

**-Installed SwitchParameter requiredsets: Installed**

Discover installed Microsoft Visio stencils and templates, then register the combined catalog.

## 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](https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_commonparameters).

Evotec API Reference Copyright 2026 Evotec Services

<!-- PowerForge markdown artifact sha256:5236C5760D1D2CD0878C13EFE88A0FCFD16634770B652F5EA4F1FB3E0DF8754B -->
