system.mes.oee.exportCalculationConfigurationsToCsv
Description
Exports OEE Calculation Configurations to a CSV 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.exportCalculationConfigurationsToCsv()
# Export configurations for specific locations
system.mes.oee.exportCalculationConfigurationsToCsv(locationIdOrPaths)
Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
locationIdOrPaths | String[] | True | Array of location IDs (ULIDs) or paths to export. If omitted, exports all configs. |
Returns
Returns a byte[] containing the CSV file content.
Code Examples
Perspective
# Export all configurations
csvBytes = system.mes.oee.exportCalculationConfigurationsToCsv()
system.perspective.download("calculation_configs.csv", csvBytes)
# Export for specific locations
locationPaths = ["Enterprise/Site/Area/Line1", "Enterprise/Site/Area/Line2"]
csvBytes = system.mes.oee.exportCalculationConfigurationsToCsv(locationPaths)
system.perspective.download("calculation_configs_filtered.csv", csvBytes)
Script Console
csvBytes = system.mes.oee.exportCalculationConfigurationsToCsv()
path = system.file.saveFile("calculation_configs.csv")
if path is not None:
system.file.writeFile(path, csvBytes)