Skip to main content
Version: V2 (Ignition 8.1)

system.mes.meter.deleteMeterType

Description

Deletes a Meter Type record by its ID or name. This cannot delete a Meter Type that is referenced by a Meter Configuration.

Permissions

This method requires the METERING.WRITE.DELETE permission.

Syntax

system.mes.meter.deleteMeterType(idOrName)

Parameters

ParameterTypeNullableDescription
idOrNameStringFalseThe ID or name of the Meter Type to delete.

Returns

If successful, an ApiResponse object is returned with the success bool set to True. If the Meter Type has 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 a Meter Type by name
response = system.mes.meter.deleteMeterType('Electricity')

# Output the response
print(response)