Skip to main content
Version: V3 (Ignition 8.3)

system.mes.meter.importMeterConfigurationsFromJson

Description

Imports Meter Configuration records from a JSON file.

Permissions

This method requires the METERING.WRITE.SAVE permission.

Syntax

system.mes.meter.importMeterConfigurationsFromJson(bytes)

Parameters

ParameterTypeNullableDescription
bytesbyte[]FalseThe JSON file contents as bytes.

Returns

Returns a JSON representation of the import response.

Code Examples

Script Console

# Open a file dialog and import Meter Configurations from the selected JSON file
path = system.file.openFile("json")
if path is not None:
jsonBytes = system.file.readFileAsBytes(path)
response = system.mes.meter.importMeterConfigurationsFromJson(jsonBytes)
print(response)