Get-VaultFileBOM

Gets the Bill of Materials data for the file.

Get-VaultFileBom -File <String> -GetChildrenBy <ReadBomRowVersionsType> [<CommonParameters>]

TypeNameDescriptionMandatoryDefault value
StringFileFull path to the file.true
BomRowVersionTypeGetChildrenByWhich version of the children it should get.false ExactVersion

BomRowVersionType

Name Description
ExactVersion Get the exact version of the component.
LatestVersion Get the latest version of the component.
LatestReleasedVersion Get the latest released version of the component. If no released version is found, the exact version is used.
LatestReleasedVersionOfRevision Get the latest released version from the same revision. If no released version is found in the Revision, the exact version is used.

FileBomRow[] ← on success
empty ← on failure

The commandlet supports the structured file BOM with following component types:

  • Normal
  • Reference
  • Phantom

You can read about the different BOM structures on the autodesk knowledge network.

For iAssembly/iPart factories the commandlet returns empty because Vault has no BOM information about the them.
Also the Assign Item function in Vault does not work on iAssembly/iPart factory files.

Get FileBOM for Pad Lock and view data in Console

 
$file = Get-VaultFile -Properties @{Name = "Pad Lock.iam"}
$fileBom = Get-VaultFileBOM -File $file._fullPath

#Print BOM data as Table like in Inventor
$fileBom | sort-object {[int]$_.Bom_PositionNumber} | Format-Table Bom_PositionNumber,'Bom_Part Number',Bom_Structure,Bom_Quantity,Bom_ItemQuantity,Bom_UnitQuantity,Bom_Unit

<#
Bom_PositionNumber Bom_Part Number Bom_Structure Bom_Quantity Bom_ItemQuantity Bom_UnitQuantity Bom_Unit
------------------ --------------- ------------- ------------ ---------------- ---------------- --------
1                  100002          Normal                   1                1                1 Each    
2                  100004          Normal                   1                1                1 Each    
3                  100005          Normal                   1                1                1 Each 
4                  100006          Normal                   1                1                1 Each 
5                  100008          Normal                   1                1                1 Each 
6                  100011          Normal                   1                1                1 Each 
7                  100010          Normal                   1                1                1 Each 
8                  100003          Normal                   1                1                1 Each 
9                  100012          Normal                   1                1                1 Each 
10                 100016          Normal                   1                1                1 Each 
11                 100009          Normal                   1                1                1 Each 
#>

Gets FileBOM data for Pad Lock with LatestReleasedVersion

 $fileBom = Get-VaultFileBOM -File "$/Designs/Inventor 2015/Padlock/Designs/Padlock/Assemblies/Pad Lock.iam" -GetChildrenBy LatestReleasedVersion