Hi,
You can get the EntityStatus of a file using the code below. That would allow you to check the local version compared to the vaulted version (ex.. MatchesLatestVaultVersion, MatchesOlderVaultVersion,etc). It doesn't tell you which version it is however. But, in the case this check returns 'MatchesOlderVaultVersion', you could get all the versions of a file by using GetFilesByMasterId, create a FileIteraction for each file version and verify the Checksum property of each FileIteration against the checksum of the file on disk..I hope this workflow works for you!
FileIteration fileIteration = new FileIteration(_connection, file);
FilePathAbsolute filePath = _connection.WorkingFoldersManager.GetPathOfFileInWorkingFolder(fileIteration);
PropertyDefinition propDef = _connection.PropertyManager.GetPropertyDefinitionBySystemName(Autodesk.DataManagement.Client.Framework.Vault.Currency.Properties.PropertyDefinitionIds.Client.VaultStatus);
var propValue = _connection.PropertyManager.GetPropertyValue(fileIteration, propDef, null);
EntityStatusImageInfo statusInfo = propValue as EntityStatusImageInfo;
Regards, Pim Saarloos Product Manager |  |  |
| If my post answers your question, please click the "Accept as Solution" button. Kudos are much appreciated! |