Update-VaultFile fails for AutoCAD files

Issue

When using the Update-VaultFile Cmdlet to update properties of AutoCAD files it fails with the following error message:

2023-10-11 13:03:02,089 [Pipeline Execution Thread] ERROR powerVault.Cmdlets.Cmdlets.Vault.Operations.FileUserDefinedPropertiesUpdate - Failed to update properties for file: 1500200_2E43.dwg
Autodesk.Connectivity.Extensibility.Framework.ExtensionException: Error updating property values ---> System.AggregateException: One or more errors occurred. ---> Connectivity.ContentSourceProperties.Currency.ProviderException: NotSupported ---> System.IO.FileNotFoundException: Could not load file or assembly 'Acdbmgd, Version=24.3.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
at Connectivity.Indexers.AcadIndexer.ACADIndexer.InitializeObjectDBX()
at Connectivity.ContentSourcePropertyProviders.Utils.DwgDatabase.InitializeDbx()
at Connectivity.ContentSourcePropertyProviders.Utils.ProviderUtilities.GetDwgFileType(String filePath)
--- End of inner exception stack trace ---
at Connectivity.ContentSourcePropertyProviders.Utils.ProviderUtilities.GetDwgFileType(String filePath)
at Connectivity.ContentSourcePropertyProviders.Providers.AutoCADProviderImpl.IsSupportedFile(String filePath)
at Connectivity.ContentSourceProperties.ContentSourcePropertyProviderMgr.WriteFileProperties(String filePath, List`1 propertyValues, WritePropertyOption option)
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
at Connectivity.Explorer.ExtensibilityUtil.ExplorerUtil.UpdateFileProperties(File file, Dictionary`2 props)
at coolOrange.VaultServices.Vault.ExplorerUtilProxy.UpdateFileProperties(File file, Dictionary`2 props)
at coolOrange.VaultServices.Vault.VaultServices.VaultServices.UpdateFileProperties(File file, Dictionary`2 propsAndValues)
at coolOrange.VaultServices.Exceptions.Util.TryReturnException[TResult,TException](Func`1 func, TException& outException)

Cause

Currently under investigation

Solution

To get around this you can manually load the missing acdbmgd.dll and add the Dwg TrueView directory to the windows path variable. Depending on your versions you'll have to update the paths

For TrueView 2024

[System.Reflection.Assembly]::LoadFrom('C:\Program Files\Autodesk\AutoCAD 2024\acdbmgd.dll')
$env:Path += ';C:\Program Files\Autodesk\DWG TrueView 2024 - English'