Message 1 of 10
How to create event handler for vault file download, add-in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I've written an add-in to get out-of-date files from Vault (basic client). If the file has been locally modified, the acquire code wont overwrite the local copy. From what I can gather this behaviour can be changed by setting the PreFileAcquireEventArgs enum to "OK".
The SDK documentation gives the class: AcquireFilesSettings.AcquireFileExtensibilityOptions.PreFileAcquireEventArgs Class
and states:
The result of the PreFileAcquireEvent. This can be set to specify how the acquire of this file should continue.
How does one handle the preacquire event?
The code to acquire as follows:
' Get settings Dim oSettings As VDF.Vault.Settings.AcquireFilesSettings = New VDF.Vault.Settings.AcquireFilesSettings(oConnection) 'get oSettings.DefaultAcquisitionOption = VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download oSettings.AddEntityToAcquire(oFileIteration) 'set the path to the working folder oSettings.LocalPath = fldrPath oConnection.FileManager.AcquireFiles(oSettings)