Skip to main content
Version: V3 (Ignition 8.3)

system.mes.meter.deleteMeterTypes

Description

Deletes multiple Meter Type records by the given IDs or names. This cannot delete any Meter Types that are referenced by Meter Configurations.

Permissions

This method requires the METERING.WRITE.DELETE permission.

Syntax

system.mes.meter.deleteMeterTypes(idsOrNames)

Parameters

ParameterTypeNullableDescription
idsOrNamesList<String>FalseList of IDs or names of Meter Types to delete.

Returns

If successful, an ApiResponse object is returned with the success bool set to True. If any Meter Types have references that prevent deletion, an ApiResponse object is returned with details about the constraint violations.

NameTypeDescription
successBooleanIndicates if the delete was successful.
messageStringThe reason why the deletion was successful or unsuccessful.
dataStringThe data associated with the deletion.
errorStringThe errors associated with the deletion.

Code Examples

# Delete multiple Meter Types by name
response = system.mes.meter.deleteMeterTypes(['Electricity', 'Water', 'Gas'])

# Output the response
print(response)