# Show-BomWindow

Opens the BOM Window for checking and transferring BOM’s and materials of Vault Files or Items.

## Syntax

 1 Show-BomWindow [-Entity] [] 

## Parameters

Type

Name

Description

Optional

PSObject

Entity

The main Vault entity for which the BOM will retrieved and displayed.
Typically, a powerVault File or Item object is passed.

no

void

## Remarks

The BOM Window retrieves the BOM tree for the passed -Entity by calling the method Get-BomRows recursively.
Such root elements must provide at least entity properties as those provided by powerVault File or Item objects.
However also custom BOM properties, such as those available on powerVault FileBomRows and ItemBomRows, can be passed and displayed as columns.

In order to customize the Check- and Transfer operations for BOMs and Items, the following functions are required additionally and must be implemented with custom logic:

Required Functions

## Examples

Showing the BOM of a Vault Item:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 $item = Get-VaultItem -Number '100001' function Get-BomRows($vaultItem) { return (Get-VaultItemBom -Number $vaultItem._Number) } function Check-Items($items) { } function Transfer-Items($items) { } function Check-Boms($boms) { } function Transfer-Boms($boms) { } Show-BomWindow -Entity$item 

Opening the Bom-Window for a Vault file with simple implementation of Check- and Transfer operations:

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 $file = Get-VaultFile -Properties @{'File Name'='MSB-Weld.iam'} if($file._HasModelState) { $allModelStates = Get-VaultFileBom -File$file._FullPath -ModelStateType All $file =$allModelStates | Where-Object { $_.Bom_ModelState -eq 'Face Machining + Treading' } } function Get-BomRows($file) { return (Get-VaultFileBom -File $file._FullPath) } function Check-Items($items) { foreach($item in$items) { $item | Update-BomWindowEntity -Status 'New' } } function Transfer-Items($items) { foreach($item in$items) { $item | Update-BomWindowEntity -Status 'Identical' } } function Check-Boms($boms) { foreach($bom in$boms) { $bom | Update-BomWindowEntity -Status 'New' } } function Transfer-Boms($boms) { foreach($bom in$boms) { $bom | Update-BomWindowEntity -Status 'Identical' } } Show-BomWindow -Entity$file 

Force the Bom-Window to be displayed in german culture:

 1 2 3 4 [CultureInfo]::DefaultThreadCurrentUICulture = [CultureInfo]::CreateSpecificCulture('de-DE') $file= Get-VaultFile -File '$/Designs/Pad Lock/Assemblies/Catch Assembly.iam' Show-BomWindow -Entity \$file