Skip to main content
Version: V2 (Ignition 8.1)

system.mes.meter.getAllMeterTypes

Description

Retrieves a list of all Meter Type records in the system.

Permissions

This method requires the METERING.READ.GET permission.

Syntax

system.mes.meter.getAllMeterTypes()

Parameters

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

Returns

Returns a list of JSON objects representing all Meter Types. Each object in the list has the following properties:

NameTypeDescription
idString (ULID)The ULID of the Meter Type.
nameStringDisplay name for this meter type (e.g., Water, Electricity, Gas).
usageUnitOfMeasureIdString (ULID)The ULID of the unit of measure for usage values.
usageUnitOfMeasureNameStringDisplay name of the usage unit of measure.
usageUnitOfMeasureSymbolStringSymbol of the usage unit of measure (e.g., kWh).
costDoubleDefault cost per unit of measure.
costUnitOfMeasureIdString (ULID)The ULID of the unit of measure for cost values.
costUnitOfMeasureNameStringDisplay name of the cost unit of measure.
costUnitOfMeasureSymbolStringSymbol of the cost unit of measure (e.g., USD).
notesStringNotes related to the meter type.
enabledBooleanIndicates if the meter type is active and enabled.
spare1StringAdditional field for user-defined context.
spare2StringAdditional field for user-defined context.
spare3StringAdditional field for user-defined context.

Code Examples

# Retrieve all Meter Types
meterTypes = system.mes.meter.getAllMeterTypes()

# Output the list of Meter Types
print(meterTypes)