Skip to main content

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

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

Method 2: With Path Prefix

ParameterTypeNullableDescription
pathPrefixStringFalseThe 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)