Message 1 of 4
Acquire file based on path from vault.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm trying to get a specific file based on the path from vault. I find loads of acquire samples but never how to select a specific file based on the path. Could someone please show me a sample of the step that I need to make to pass a value to these methods? I think I need to work with the "Download assembly" method.
' VB
Imports VDF = Autodesk.DataManagement.Client.Framework
Public Sub DownlodFiles(fileIters As ICollection(Of VDF.Vault.Currency.Entities.FileIteration))
' download individual files to a temp location
Dim settings As New VDF.Vault.Settings.AcquireFilesSettings(m_conn)
settings.LocalPath = New VDF.Currency.FolderPathAbsolute("c:\temp")
For Each fileIter As VDF.Vault.Currency.Entities.FileIteration In fileIters
settings.AddFileToAcquire(fileIter, _ _
VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download)
Next
Dim results As VDF.Vault.Results.AcquireFilesResults = _
m_conn.FileManager.AcquireFiles(settings)
End Sub
Public Sub DownloadAssembly(topLevelAssembly As VDF.Vault.Currency.Entities.FileIteration)
' download the latest version of the assembly to working folders
Dim settings As New VDF.Vault.Settings.AcquireFilesSettings(m_conn)
settings.OptionsRelationshipGathering.FileRelationshipSettings.IncludeChildren = True
settings.OptionsRelationshipGathering.FileRelationshipSettings.RecurseChildren = True
settings.OptionsRelationshipGathering.FileRelationshipSettings.VersionGatheringOption = _
VDF.Vault.Currency.VersionGatheringOption.Latest
settings.AddFileToAcquire(topLevelAssembly, _
VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download)
Dim results As VDF.Vault.Results.AcquireFilesResults = _
m_conn.FileManager.AcquireFiles(settings)
End Sub
Public Sub DownloadDialog(fileIter As VDF.Vault.Currency.Entities.FileIteration, _
parentWindowHandle As IntPtr)
' pop up the Get/Checkout dialog
Dim settings As New VDF.Vault.Forms.Settings.InteractiveAcquireFileSettings( _
m_conn, parentWindowHandle, "Download files")
settings.AddEntityToAcquire(fileIter)
VDF.Vault.Forms.Library.AcquireFiles(settings)
End Sub
Please kudo if this post was helpfull
Please accept as solution if your problem was solved
Inventor 2014 SP2
