# Export-OfficeVisioStencilPreviewGallery

Exports preview artwork from a Visio stencil package into a browsable HTML gallery.

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: Export-VisioStencilPreviewGallery

**Module**

`PSWriteOffice`

**Aliases**

`Export-VisioStencilPreviewGallery`

**Inputs**

`None`

**Outputs**

`OfficeIMO.Visio.Stencils.VisioStencilPreviewGallery`

**Source**

[ExportOfficeVisioStencilPreviewGalleryCommand.cs:18](https://github.com/EvotecIT/PSWriteOffice/blob/main/Sources/PSWriteOffice/Cmdlets/Visio/ExportOfficeVisioStencilPreviewGalleryCommand.cs#L18) 

Exports preview artwork from a Visio stencil package into a browsable HTML gallery.

## Syntax

```
Export-OfficeVisioStencilPreviewGallery
[-DefaultHeight <Double>]
[-DefaultWidth <Double>]
[-IncludeUnsupportedMasters]
[-IndexFileName <String>]
[-MasterName <String[]>]
[-NoIndex]
[-NoLearnMasterDimensions]
[-NoThumbnails]
[-OutputDirectory] <String>
[-PassThru]
[-Path] <String>
[-PreviewDirectoryName <String>]
[-ThumbnailDirectoryName <String>]
[-ThumbnailHeight <Int32>]
[-ThumbnailWidth <Int32>]
[-Title <String>]
[<CommonParameters>]
```

[#](#member-efc59bd96ec2f35d10dac8e5)

Parameter set: `All Parameter Sets`

## Examples

### Create a stencil preview gallery.

```powershell
$gallery = Export-OfficeVisioStencilPreviewGallery -Path .\MyShapes.vssx -OutputDirectory .\StencilGallery -Title 'Custom stencil previews' -PassThru
$gallery | Select-Object PackagePath, IndexPath, BrowserRenderableCount, ThumbnailCount
```

Extracts preview artwork from package-backed masters and writes preview files plus an HTML index.

## Parameters

**-DefaultHeight Double optional**

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

**-DefaultWidth Double optional**

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

**-IncludeUnsupportedMasters SwitchParameter optional**

Include unsupported package masters when looking for preview artwork.

**-IndexFileName String optional**

Generated HTML index file name.

**-MasterName String[] optional**

Optional master filters for package-backed catalogs.

**-NoIndex SwitchParameter optional**

Do not write an HTML index file.

**-NoLearnMasterDimensions SwitchParameter optional**

Skip reading master dimensions from package master parts.

**-NoThumbnails SwitchParameter optional**

Do not write browser-renderable thumbnail wrappers.

**-OutputDirectory String requiredposition: 1**

Directory that receives preview payloads, thumbnails, and the HTML index.

**-PassThru SwitchParameter optional**

Emit the structured gallery result after the files are written.

**-Path String requiredposition: 0aliases: FilePath, LiteralPath**

Visio package path, such as .vsdx, .vssx, or .vstx.

**-PreviewDirectoryName String optional**

Subdirectory that receives extracted preview payload files.

**-ThumbnailDirectoryName String optional**

Subdirectory that receives generated thumbnail wrappers.

**-ThumbnailHeight Int32 optional**

Generated thumbnail height in pixels.

**-ThumbnailWidth Int32 optional**

Generated thumbnail width in pixels.

**-Title String optional**

Gallery title. When omitted, a title is derived from the package name.

## 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:24EC29EF721E05E758C8E3EDD6D4F828DD4E15D8F13BC21FB4DACCBE9EF0231B -->
