BatchTrace

Title  Batch Trace

Description

          

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:

Syntax

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

Parameter Explanation Data Type
in_utility_network Dialog Reference

<p>The utility network that will be used to trace.</p>

GPUtilityNetworkLayer
trace_locations Dialog Reference

<p>The table from which to load starting points for trace.</p>

GPTableView
result_types Dialog Reference

<p> Specifies the type of results that will be returned by the trace. <ul><li>Selection - The trace results will be returned as a selection set on the appropriate network features.</li><li>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.</li><li>Connectivity - The trace results will be returned as a connectivity graph in a specified output .json file. This option requires the Output JSON parameter.</li><li>Elements - The trace results will be returned as feature-based information in a specified output .json file. This option requires the Output JSON parameter.</li><li>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.</li></ul> </p>

GPMultiValue
trace_config Dialog Reference

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

GPString
expression (Optional) Dialog Reference

<p>The simple calculation expression used to limit the starting points used in a trace.</p>

GPSQLExpression
output_folder (Optional) Dialog Reference

<p>The location of the output items. If specified, a stats mobile geodatabase is created here. The folder is required for the Connectivity, Elements and Aggregated Results result types. For Connectivity and Elements result types, the json_files folder will contain the resulting files. For the Aggregated Results result type, a mobile geodatabase called AggregatedGeometry is created in this location.</p>

DEFolder
key_field (Optional) Dialog Reference

<p>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.</p>

Field
summary_store_field (Optional) Dialog Reference

<p>Optional field used to store summary results on the starting points.</p>

GPString
fields (Optional) Dialog Reference

<p> 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: <ul><li>From Field - The field from the starting points to propagate.</li><li>Source Name - The name of the utility network source.</li><li>To Field - The field on the source class to update.</li><li>Calculation Mode - How to combine values.</li></ul> Calculation mode supports: <ul><li>Concatenate with existing - Read existing values and combine with new values.</li><li>Concatenate and overwrite - Combine new values.</li></ul> </p>

GPValueTable
calc_on_start (Optional) Dialog Reference

<p>If specified, the calculate will also update the features the starting points are placed on.</p>

GPBoolean
Dialog Reference

<p>The output folder for the elememtn and connectivity files. This is returned when Connectivity or Elements results type is selected.</p>

DEFolder
Dialog Reference

<p>The output aggregate geodatabase if Aggregated Geometry is selected as a result type.</p>

DEWorkspace
history_field (Optional) Dialog Reference

<p>A field with a historical date value(as a string) that will be used to run a trace in a previous moment to compare to the current moment.</p>

Field
Dialog Reference

<p>A table with information about execution of the batch trace. This is only created when an output folder is specified.</p>

DETable

Code Samples

Environments

workspace