system.mes.location.getAllLocationPaths
Description
Retrieves a list of all Location paths in the system. Optionally filters by a path prefix to return only paths under a specific branch of the location tree.
Syntax
system.mes.location.getAllLocationPaths()
system.mes.location.getAllLocationPaths(pathPrefix)
Parameters
Method 1: No Parameters
| Parameter | Type | Nullable | Description |
|---|---|---|---|
| None | - | - | This method does not take any parameters. |
Method 2: With Path Prefix
| Parameter | Type | Nullable | Description |
|---|---|---|---|
pathPrefix | String | False | The path prefix to filter locations by. |
Returns
Returns a list of strings representing location paths.
Code Examples
# Retrieve all location paths
allPaths = system.mes.location.getAllLocationPaths()
print(allPaths)
# Retrieve location paths under a specific branch
filteredPaths = system.mes.location.getAllLocationPaths('DairyCo/Plant1/')
print(filteredPaths)