# Export-OfficeVisioStencilPreviewGallery

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

Cmdlet 

**Module**

`PSWriteOffice`

**Inputs**

`System.String`

**Outputs**

`OfficeIMO.Visio.Stencils.VisioStencilPreviewGallery`

**Source**

[ExportOfficeVisioStencilPreviewGalleryCommand.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/PowerShell/PSWriteOffice/Sources/PSWriteOffice/Cmdlets/Visio/ExportOfficeVisioStencilPreviewGalleryCommand.cs#L19) 

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

## Syntax

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

[#](#member-6b717cda046421c868f9d506)

Parameter set: `Path`

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

[#](#member-d2bc415efe345ad0578e0cfd)

Parameter set: `LiteralPath`

## Guides & Samples

Authored walkthroughs and practical samples linked to this command.

- [Use Visio Stencils and Shape Catalogs](/docs/visio/stencils-and-catalogs/) Guide
  
  Place shapes from OfficeIMO's built-in catalogs or from VSSX and VSTX stencil packs you supply, and keep the link to each shape's master.

## 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 OfficeLength optional**

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

**-DefaultWidth OfficeLength 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: FilePathsets: Path**

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.

**-WhatIf SwitchParameter optional**

Shows what would happen if the command runs.

**-Confirm SwitchParameter optional**

Prompts for confirmation before running the command.

**-LiteralPath String requiredpipeline: True (ByPropertyName)aliases: FullName, PSPathsets: LiteralPath**

Literal Visio package path.

## 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).

<!-- PowerForge markdown artifact sha256:00342036489117C37D1AB5D0370353D077D94DDB1218E6AF9956C266A0D49697 -->
