Skip to main content
Version: V3 (Ignition 8.3)

system.mes.oee.exportCalculationConfigurationsToJson

Description

Exports OEE Calculation Configurations to a JSON byte array. Omit locationIdOrPaths to export all configurations; pass an array to export configurations for specific locations only.

Permissions

This method requires the OEE.READ.GET permission.

Syntax

# Export all configurations
system.mes.oee.exportCalculationConfigurationsToJson()

# Export configurations for specific locations
system.mes.oee.exportCalculationConfigurationsToJson(locationIdOrPaths)

Parameters

ParameterTypeNullableDescription
locationIdOrPathsString[]TrueArray of location IDs (ULIDs) or paths to export. If omitted, exports all configs.

Returns

Returns a byte[] containing the JSON file content.

Code Examples

Perspective

# Export all configurations
jsonBytes = system.mes.oee.exportCalculationConfigurationsToJson()
system.perspective.download("calculation_configs.json", jsonBytes)

# Export for specific locations
locationPaths = ["Enterprise/Site/Area/Line1", "Enterprise/Site/Area/Line2"]
jsonBytes = system.mes.oee.exportCalculationConfigurationsToJson(locationPaths)
system.perspective.download("calculation_configs_filtered.json", jsonBytes)

Script Console

jsonBytes = system.mes.oee.exportCalculationConfigurationsToJson()
path = system.file.saveFile("calculation_configs.json")
if path is not None:
system.file.writeFile(path, jsonBytes)