Skip to main content
Version: V3 (Ignition 8.3)

system.mes.productionOrder.exportPropertiesAsJson

Description

Exports all or selected production order properties as raw bytes in JSON format (UTF-8 encoded). Streams production order property data from the database and formats it as JSON. When idsOrNames is omitted, all production order properties are exported.

Permissions

This method requires the PRODUCTION_ORDER.READ.GET permission.

Syntax

system.mes.productionOrder.exportPropertiesAsJson()
system.mes.productionOrder.exportPropertiesAsJson(idsOrNames=["Priority"])

Parameters

ParameterTypeNullableDescription
idsOrNamesString[]YesThe ids or names of the production order properties to export. Omit to export all.

Returns

A byte array (byte[]) containing the raw byte data of the JSON export.

Code Examples

Perspective

jsonBytes = system.mes.productionOrder.exportPropertiesAsJson()
system.perspective.download("production-order-properties.json", jsonBytes)

Script Console

jsonBytes = system.mes.productionOrder.exportPropertiesAsJson()
path = system.file.saveFile("production-order-properties.json")
if path is not None:
system.file.writeFile(path, jsonBytes)