Skip to main content
Version: V3 (Ignition 8.3)

system.mes.equipment.newEquipment

Description​

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

Permissions​

This method does not require any permissions.

Syntax​

system.mes.equipment.newEquipment()

Parameters​

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

Returns​

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

KeyDefault Value
namenull
descriptionnull
pathnull
equipmentClassIdnull
locationIdnull
idnull
notesnull
enabledtrue
spare1null
spare2null
spare3null

Code Examples​

newEquipment = system.mes.equipment.newEquipment()
newEquipment['name'] = 'Pump-101'
newEquipment['equipmentClassId'] = 'Pumps/CentrifugalPumps'
savedEquipment = system.mes.equipment.saveEquipment(**newEquipment)
print(savedEquipment)