Creates a feature class for use as the starting points, stopping points, and barriers input for the Trace tool.
Usage
The output feature class will have the same schema as the input starting points, stopping points, and barriers required as input for the Trace tool. This allows you to specify different trace locations across trace operations in ModelBuilder or Python.
You cannot simultaneously specify values for the Load Selected Features and Trace Locations parameters; they are mutually exclusive.
The input utility network where the trace locations will be added.
Important:
When the utility network specified for the Input Utility Network parameter contains a telecom domain network, the output trace locations include three additional fields: FIRSTUNIT, LASTUNIT, and COLORSCHEME. These fields must be manually modified in the output feature class to specify the unit identifiers in the grouped objects to which the trace location applies.
Utility Network; Utility Network Layer
Output Feature Class
The output feature class containing the trace locations.
If you provide a new feature class name, a new output feature class will be created. You can provide the name of an existing feature class and choose to append to any existing trace locations in the feature class, or overwrite these using the Clear Trace Locations parameter.
Note:
When working with utility network version 7 or later, the output feature class can be created in a mobile, file, or enterprise geodatabase
Feature Class
Load Selected Features
(Optional)
Specifies whether selected features in the active map will be loaded as trace locations.
Checked—Trace locations will be loaded based on the selection in the map.
Unchecked—Trace locations will not be loaded based on the selection in the map. This is the default. However, trace locations can be specified using the Trace Locations parameter.
Boolean
Clear Trace Locations
(Optional)
Specifies whether existing trace locations will be cleared from the output feature class.
Checked—Existing trace locations will be cleared.
Unchecked—Existing trace locations will not be cleared; they will be kept and appended to. This is the default.
Boolean
Trace Locations
(Optional)
The trace locations that will be added to the output feature class. If you are not using the Load Selected Features parameter in an active map, you can use this parameter to specify the utility network features to add as trace locations by providing the required values in the value table.
Value table columns:
Layer Name—The layer that contains the locations to add.
Global ID—The Global ID of the feature for the location to add.
Terminal—The terminal ID of the feature for the location to add.
Percent Along—The percent along value of the feature. For lines and edge objects, the default value is 0.5.
Value Table
Filter Barrier
Specifies whether the trace locations will behave as filter barriers when used as barriers.
Checked—The barriers will behave as filter barriers. This is useful for subnetwork-based traces in which the barrier allows the subnetwork to be evaluated first and is then applied on a second traversal of the network features.
Unchecked—The barriers will behave as traversability barriers, which define the extent of subnetworks, and will be evaluated on the first pass. This is the default.
The input utility network where the trace locations will be added.
Important:
When the utility network specified for the in_utility_network parameter contains a telecom domain network, the output trace locations include three additional fields: FIRSTUNIT, LASTUNIT, and COLORSCHEME. These fields must be manually modified in the output feature class to specify the unit identifiers in the grouped objects to which the trace location applies.
Utility Network; Utility Network Layer
out_feature_class
The output feature class containing the trace locations. If you provide a new feature class name, a new output feature class will be created. You can provide the name of an existing feature class and choose to append to any existing trace locations in the feature class, or overwrite these using the clear_trace_locations parameter.
Note:
When working with utility network version 7 or later, the output feature class can be created in a mobile, file, or enterprise geodatabase
Feature Class
load_selected_features
(Optional)
Specifies whether selected features in the active map will be loaded as trace locations.
LOAD_SELECTED_FEATURES—Trace locations will be loaded based on the selection in the map.
DO_NOT_LOAD_SELECTED_FEATURES—Trace locations will not be loaded based on the selection in the map. This is the default. However, trace locations can be specified using the trace_locations parameter.
Boolean
clear_trace_locations
(Optional)
Specifies whether existing trace locations will be cleared from the output feature class.
CLEAR_LOCATIONS—Existing trace locations will be cleared.
KEEP_LOCATIONS—Existing trace locations will not be cleared; they will be kept and appended to. This is the default.
Boolean
trace_locations[[Layer Name, Global ID, Terminal ID, Percent Along],...]
(Optional)
The trace locations that will be added to the output feature class. If you are not using the load_selected_features parameter in an active map, you can use this parameter to specify the utility network features to add as trace locations by providing the required values in the value table.
Value table columns:
Layer Name—The layer that contains the locations to add.
Global ID—The Global ID of the feature for the location to add.
Terminal—The terminal ID of the feature for the location to add.
Percent Along—The percent along value of the feature. For lines and edge objects, the default value is 0.5.
Value Table
filter_barrier
Specifies whether the trace locations will behave as filter barriers when used as barriers.
FILTER_BARRIER—The barriers will behave as filter barriers. This is useful for subnetwork-based traces in which the barrier allows the subnetwork to be evaluated first and is then applied on a second traversal of the network features.
TRAVERSABILITY_BARRIER—The barriers will behave as traversability barriers, which define the extent of subnetworks, and will be evaluated on the first pass. This is the default.
Boolean
Code sample
AddTraceLocations example 1 (Python window)
Add trace locations to a new output feature class named TraceLocations by loading features selected in the active map.
import arcpy
arcpy.env.outputZFlag = "Enabled"
arcpy.un.AddTraceLocations("Naperville Electric UN",
r"C:\MyUNProject\MyUNProject.gdb\TraceLocations",
"LOAD_SELECTED_FEATURES")
AddTraceLocations example 2 (stand-alone script)
Add trace locations to an existing feature class named TraceLocations with no active map.
import arcpy
# Set the outputZFlag environment to Enabled
arcpy.env.outputZFlag = "Enabled"
# AddTraceLocations
arcpy.un.AddTraceLocations(r"http://landbase.mydomain.com/server/rest/services/NapervilleElectric/FeatureServer/9",
r"C:\Project\MyUNProject.gdb\TraceLocations",
"DO_NOT_LOAD_SELECTED_FEATURES",
"KEEP_LOCATIONS",
"'Circuit Breaker' {DDB0765D-860A-4054-908D-9360E1A32F74} '(3/Load)' #;'ElecDist Line' {67C0534B-A80D-4E5F-8926-5FB5F887A5F2} # 0.25",
"TRAVERSABILITY_BARRIER")