Description
When the BOM Window is started for the first time it displays the top level BOM head and doesn't load any BOM rows. When the window is closed and opened again all the rows load correctly. This can happen in powerEvents in Inventor or Vault Datastandard.
Cause
This is a known deadlock issue and will be addressed in a future update
Solution
The deadlock happens when the property values are loaded at the wrong time. An easy way to prevent this is by accessing them in Get-BomRows, so all of the values are loaded before they are passed to the graphical user interface.
Example:
function global:Get-BomRows($file) {
$fileBomRows = (Get-VaultFileBom -File $file._FullPath)
# WORKAROUND:
foreach($row in $fileBomRow) {
foreach ($prop in $row.psobject.members) {
"$($prop.Value)" > $null #<- accessing some $fileBomRow property-value retieves all Vault properties at once!
}
}
return $fileBomRows
}