Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results forĀ 
ShowĀ Ā onlyĀ  | Search instead forĀ 
Did you mean:Ā 

Updating DWG to reflect changes made in Vault

3 REPLIES 3
Reply
Message 1 of 4
8013068
440 Views, 3 Replies

Updating DWG to reflect changes made in Vault

I have a program that finds files in vault using FindFilesBySearchConditions and then downloads the related DWGs to the user's computer using the code below. This works great 99.7% of the time. However, we've found that if someone makes a change to a document and never opens the DWG file (such as changing the part number property using vault), the DWG file the program downloads won't reflect that change. 

How can I fix this? Is there an "update" command or something I can use?
Any help is really appreciated...

Thanks

 Public Sub download(file)
Dim fileiter As New VDF.Vault.Currency.Entities.FileIteration(GV.connectionx, file)
Dim settings As New VDF.Vault.Settings.AcquireFilesSettings(GV.connectionx)
settings.LocalPath = New VDF.Currency.FolderPathAbsolute(GV.folderloc)
settings.AddFileToAcquire(fileiter, VDF.Vault.Settings.AcquireFilesSettings.AcquisitionOption.Download)
Dim results As VDF.Vault.Results.AcquireFilesResults = GV.connectionx.FileManager.AcquireFiles(settings)
End Sub

 

3 REPLIES 3
Message 2 of 4

Hi,

 

Have you tried setting the VersionGatheringOption to Latest?

 

settings.OptionsRelationshipGathering.FileRelationshipSettings.VersionGatheringOption = VDF.Vault.Currency.VersionGatheringOption.Latest;

 

 

Regards,

Sajith

 


Sajith Subramanian
Autodesk Developer Network
Message 3 of 4

I added that line of code, and it didn't change. We've found that if you open and check out the file manually through vault and then check it back in, the properties update and the correct file is downloaded in the future.

I found this article describing a related problem, maybe it's related to this? 
https://adndevblog.typepad.com/manufacturing/2014/12/acquirefiles-download-not-fixing-references-of-...

Message 4 of 4
8013068
in reply to: 8013068

Then again, that involved the SDK from 2014, so I don't know if that's relevant to 2018.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report