Sets the properties of multiple objects.
Visual Basic |
---|
Public Function SetPropertiesOfMultipleObjects( _ ByVal SetPropertiesParamsOfObjects As SetPropertiesParamsOfMultipleObjects _ ) As ObjectVersionAndPropertiesOfMultipleObjects |
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