Skip to main content
Version: V3 (Ignition 8.3)

system.mes.equipment.exportPropertiesAsJson

Description​

Exports Equipment Properties records as a JSON string (UTF-8 encoded). When called without arguments, exports all equipment properties. When called with a list of IDs or names, exports only the specified records.

Permissions​

This method requires the EQUIPMENT.READ.GET permission.

Syntax​

system.mes.equipment.exportPropertiesAsJson()
system.mes.equipment.exportPropertiesAsJson(idsOrNames)

Parameters​

Method 1: No Parameters​

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

Method 2: With IDs or Names​

ParameterTypeNullableDescription
idsOrNamesString[]FalseAn array of equipment property IDs or names to export.

Returns​

Returns all matching equipment property records as a JSON string (UTF-8 encoded).

Code Examples​

Perspective​

jsonString = system.mes.equipment.exportPropertiesAsJson()
system.perspective.download("equipment-properties.json", jsonString)

Script Console​

jsonString = system.mes.equipment.exportPropertiesAsJson()
path = system.file.saveFile("equipment-properties.json")
if path is not None:
system.file.writeFile(path, jsonString)