M-Files API 22.6.11519.0
SetPropertiesOfMultipleObjects Method
VaultObjectPropertyOperations Object : SetPropertiesOfMultipleObjects Method
Description
Sets the properties of multiple objects.
Syntax
Visual Basic
Public Function SetPropertiesOfMultipleObjects( _
   ByVal SetPropertiesParamsOfObjects As SetPropertiesParamsOfMultipleObjects _
) As ObjectVersionAndPropertiesOfMultipleObjects
Parameters
SetPropertiesParamsOfObjects
Example
Sub SetPropertiesOnMultipleObjects( _
        ByVal vault As MFilesAPI.Vault, _
        ByVal objectVersions As MFilesAPI.ObjectVersions, _
        ByVal propertyValues As MFilesAPI.PropertyValues)

    ' Create parameter collection.
    Dim propertiesOfMultipleObjects As New MFilesAPI.SetPropertiesParamsOfMultipleObjects

    ' Set the properties in the param for each object.
    For Each objVer As MFilesAPI.ObjVer In objectVersions.GetAsObjVers()

        ' Create a parameter representing one object version.
        Dim param As New MFilesAPI.SetPropertiesParams
        param.ObjVer = objVer
        param.PropertyValuesToSet = propertyValues

        ' Add the parameter for one object version to the collection
        ' that defines parameters for multiple objects.
        propertiesOfMultipleObjects.Add(-1, param)

    Next

    ' Push the property assignment to M-Files Vault.
    vault.ObjectPropertyOperations.SetPropertiesOfMultipleObjects(propertiesOfMultipleObjects)

End Sub
See Also

VaultObjectPropertyOperations Object  | VaultObjectPropertyOperations Members