When updating Vault file properties with Update-VaultFile or $vaultExplorer.UpdatFileProperties in a powerEvents event AutoCAD crashes.


This is caused because some assemblies are loaded from multiple locations by powerVault since AutoCAD 2021.


One possible workaround is to temporarily change the Vault client installation directory in the registry so powerVault isn't loading libraries from multiple locations. The below wrapper function Update-VaultFileAutoCAD can be used to replace your Update-VaultFile calls.

  • In C:\ProgramData\coolOrange\powerEvents\Modules create a new file AutoCAD_Crash_Workaround.psm1 with the following content
function Update-VaultFileAutoCAD {
  param (
  $someFileInVaultAddinDirectory = ([Autodesk.Connectivity.WebServicesTools.WebServiceManager]).Assembly
  $vaultClientExeVersion = $someFileInVaultAddinDirectory.GetName().Version.ToString(2)
  $vaultClientExeLocation = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Autodesk\PLM\Autodesk Vault Professional $vaultClientExeVersion\").Executable
  Set-ItemProperty "HKLM:\SOFTWARE\Autodesk\PLM\Autodesk Vault Professional $vaultClientExeVersion\" -Name 'Executable' -Value ($someFileInVaultAddinDirectory.Location)
  $update = Update-VaultFile -File $File -Comment $Comment -Category $Category -Status $Status `
                 -LifecycleDefinition $LifecycleDefinition -Revision $Revision -RevisionDefinition $RevisionDefinition `
                 -Properties $Properties -AddChilds $AddChilds -Childs $Childs -RemoveChilds $RemoveChilds `
                 -AddAttachments $AddAttachments -Attachments $Attachments -RemoveAttachments $RemoveAttachments

  Set-ItemProperty "HKLM:\SOFTWARE\Autodesk\PLM\Autodesk Vault Professional $vaultClientExeVersion\" -Name 'Executable' -Value $vaultClientExeLocation

  • Afterwards you need to replace your calls to Update-VaultFile with the new Update-VaultFileAutoCAD function in every script that will run during an AutoCAD checkin. 


If your script looks like this:

Register-VaultEvent -EventName AddFile_Post -Action 'PostAddFile'
function PostAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom, $successful) {
  Update-VaultFile -File $file._FullPath -Properties @{
    'Description' = 'Pen'
    'Engineer' = 'Me'
    'Fruits' = 'Tomato'

It will look like this afterwards:

Register-VaultEvent -EventName AddFile_Post -Action 'PostAddFile'
function PostAddFile($file, $parentFolder, $dependencies, $attachments, $fileBom, $successful) {
  Update-VaultFileAutoCAD -File $file._FullPath -Properties @{
    'Description' = 'Pen'
    'Engineer' = 'Me'
    'Fruits' = 'Tomato'