Autodesk Vault ProfessionalVault API

DeleteFileVersionsByMasterIdsUnconditional Method

Autodesk.Connectivity.WebServicesDocumentService

Purges older versions of a file based on certain criteria.

Required Permissions

FileDeleteUnconditional

Syntax

public FileDelStatus[] DeleteFileVersionsByMasterIdsUnconditional(
   System.long[] fileMasterIds,
   System.bool deleteUncontrolledVersions,
   System.int keepCount,
   System.int minAge,
   System.string comment
)
Public Function DeleteFileVersionsByMasterIdsUnconditional( _
   ByVal fileMasterIds() As System.Long, _
   ByVal deleteUncontrolledVersions As System.Boolean, _
   ByVal keepCount As System.Integer, _
   ByVal minAge As System.Integer, _
   ByVal comment As System.String _
) As FileDelStatus()

Parameters

NameDescription
fileMasterIdsAn array of File Masters IDs.
deleteUncontrolledVersionsIf false, all versions that can be purged are purged. If true, the versions purged are dependent on the next 3 parameters.
keepCountThe number of versions to keep. Example: If there are 10 versions of a file and this value is 7, then only the first 3 versions will be deleted. This parameter is only used if deleteUncontrolledVersions is true.
minAgeThe minimum age, in days, that a version has to be. Example: If this value is 60, then only versions older than 60 days will be deleted. This parameter is only used if deleteUncontrolledVersions is true.
commentVersions will not be deleted if this value is in the comment. Example: If this value is 'approved', then versions with the word 'approved' in the comment text will not be deleted. This parameter is only used if deleteUncontrolledVersions is true.

Return Value

A report of which versions have been deleted and which versions have not.

Remarks

This function has less restrictions than DeleteFileVersionsByMasterIds on which versions can be deleted. Labeled and locked versions can be deleted. Versions can be deleted if they are linked to another version. Versions cannot be deleted if they are linked to an Item. The most recent version cannot be deleted.

If there is no matching return object for a given input file ID, it can be assumed that the version was not deleted.

See Also