BatchTrace

Title  Batch Trace

Description

Iterate through the starting points to trace the utility network and use the results.

Usage

          
This tool uses a with starting point information to trace the utility network. The starting points are optionally grouped so set of starting points is used in each trace.
The trace results can be used to select features in a map, calculate values on results, create connectivity and element files or save the aggregated geometry with summary information.
The starting points layer uses a field to determine if a row is a starting point and/or barrier. A feature as a starting point and filter barrier is useful in a connected trace to determine all the items between the starting points.

The starting points table requires the following fields:
  • FEATUREGLOBALID: GUID
  • TERMINALID: Short
  • PERCENTALONG: Double

Syntax

BatchTrace (in_utility_network, trace_locations, result_types, trace_config, {expression}, {output_folder}, {key_field}, {summary_store_field}, {fields}, {calc_on_start})

Parameter Explanation Data Type
in_utility_network Dialog Reference

The utility network that will be used to trace.

GPUtilityNetworkLayer
trace_locations Dialog Reference

The table from which to load starting points for trace.

GPTableView
result_types Dialog Reference

Specifies the type of results that will be returned by the trace.

  • Selection - The trace results will be returned as a selection set on the appropriate network features.
  • Aggregated Geometry - The trace results will be aggregated by geometry type and stored in multipart feature classes displayed in the layers in the active map.
  • Connectivity - The trace results will be returned as a connectivity graph in a specified output .json file. This option enables the Output JSON parameter.
  • Elements - The trace results will be returned as feature-based information in a specified output .json file. This option enables the Output JSON parameter.
  • Calculate - Update a field in the trace results from information on the starting points. If multiple starting points are used, the value from the lowest OID is used.

GPString
trace_config Dialog Reference

The utility network trace configuration used to define the trace parameters or a field with trace configurations.

GPString
expression (Optional) Dialog Reference

The simple calculation expression used to limit the starting points used in a trace.

GPSQLExpression
output_folder (Optional) Dialog Reference

The location of the output json files and mobile geodatabase with the aggregated geometry. This parameter is only applicable for the Aggregated Geometry, Elements or Connectivity result type.

DEFolder
key_field (Optional) Dialog Reference

Field used to group starting points and barriers. When specified, records with the same value will used for a single trace. By default, a trace is run for every starting point.

Field
summary_store_field (Optional) Dialog Reference

Optional field used to store summary results on the starting points.

GPString
fields (Optional) Dialog Reference

The mapping of starting points field to network source field. This parameter is only applicable for the Calculation result type. Mapping components are as follows:

  • From Field - The field from the starting points to propagate.
  • Source Name - The name of the utility network source.
  • To Field - The field on the source class to update.
  • Calculation Mode - How to combine values.
Calculation mode supports:
  • Concatenate with existing - Read existing values and combine with new values.
  • Concatenate and overwrite - Combine new values.

GPValueTable
calc_on_start (Optional) Dialog Reference

If specified, the calculate will also update the features the starting points are placed on.

GPBoolean

Code Samples

Tags

Credits

Use limitations