Skip to main content

system.mes.equipment.newEquipmentProperty

Description

Generates an empty non-persisted Equipment Properties object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveEquipmentProperty method in order to persist the record.

Permissions

This method does not require any permissions.

Syntax

system.mes.equipment.newEquipmentProperty()

Parameters

ParameterTypeNullableDescription
None--This method does not take any parameters.

Returns

Returns a JSON representation of the newly created equipment property object. The following is a list of keys and default values:

KeyDefault Value
namenull
descriptionnull
dataTypeString
lowLimitnull
highLimitnull
formatnull
unitOfMeasureIdnull
unitOfMeasureNamenull
unitOfMeasureSymbolnull
optionsnull
nullablefalse
defaultValuenull
idnull
notesnull
enabledtrue
spare1null
spare2null
spare3null

Code Examples

newProperty = system.mes.equipment.newEquipmentProperty()
newProperty['name'] = 'MaxFlowRate'
newProperty['description'] = 'Maximum flow rate in liters per minute.'
newProperty['dataType'] = 'Float8'
savedProperty = system.mes.equipment.saveEquipmentProperty(**newProperty)
print(savedProperty)