system.mes.equipment.setEquipmentPropertyValue
Description
Sets the value of an Equipment Property Values record for a given equipment and property, creating the record if it does not already exist.
Permissions
This method requires the EQUIPMENT.WRITE.SAVE permission.
Syntax
system.mes.equipment.setEquipmentPropertyValue(equipmentIdOrPath, propertyIdOrName, value)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
equipmentIdOrPath | String | False | The ID or path of the equipment. |
propertyIdOrName | String | False | The ID or name of the equipment property. |
value | Mixed | True | The value to assign. The type depends on the data type of the property. May be None to clear the value, but only when the property definition is nullable; passing None for a non-nullable property raises an error. |
Returns
Returns a JSON representation of the updated equipment property value.
Code Examples
updatedValue = system.mes.equipment.setEquipmentPropertyValue('Pumps/CentrifugalPumps/Pump-101', 'MaxFlowRate', 300.0)
print(updatedValue)
# Clear the value of a nullable property by passing None
system.mes.equipment.setEquipmentPropertyValue('Pumps/CentrifugalPumps/Pump-101', 'MaxFlowRate', None)