Export Trace Configurations (Utility Network)

This ArcGIS 2.7 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Available with Standard or Advanced license.

Summary

Exports trace configurations from a utility network to a JSON file (.json).

This tool can be used in conjunction with the Import Trace Configurations tool.

Learn more about how to export a trace configuration

Usage

  • When working with an enterprise geodatabase, the following apply:
    • The Input Utility Network parameter value must be from a utility network service.
    Note:

    The Input Utility Network parameter value can be from a database connection established as the database utility network owner when connected as the portal utility network owner or a portal account with the administrator role.

  • The portal utility network owner can view and export any trace configuration in the utility network. Other users can only view and export the trace configurations they create.

  • The information in the .json file is stored in the following format:

    [
    	{
    		"creator": "<property representing the connected portal account on creation>",
    		"name": "<property  representing the trace configuration name>",
    		"description": "<property representing the description of the trace configuration>",
    		"traceType": <property representing the trace type>,
    		"configuration": <property representing the collection of trace configuration parameters>,
    		"resultTypes": "[<property representing the types of results to return>]",
    		"tags": "<property representing user provided tags>"
    	}
    ]

    Example JSON from a utility network using the Export Trace Configurations tool:

    [
    	{
    		"creator": "portaladmin_un",
    		"name": "Connected_RMT002_A",
    		"description": "Connected trace on subnet RMT002",
    		"traceType": 1,
    		"configuration": "{"includeBarriers":true,"validateConsistency":true,"ignoreBarriersAtStartingPoints":false,"allowIndeterminateFlow":false,"shortestPathNetworkAttributeName":"","traversabilityScope":"junctionsAndEdges","conditionBarriers":[],"functionBarriers":[],"functions":[],"outputFilters":[],"outputConditions":[],"pathDirection":"noDirection"}",
    		"resultTypes": "[{"type":"elements","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]},{"type":"aggregatedGeometry","includeGeometry":false,"includePropagatedValues":false,"networkAttributeNames":[],"diagramTemplateName":"","resultTypeFields":[]}]",
    		"tags": "["connected","RMT002"]"
    	}
    ]

Syntax

arcpy.un.ExportTraceConfigurations(in_utility_network, trace_config_name, out_json_file)
ParameterExplanationData Type
in_utility_network

The utility network containing the trace configuration or configurations to export.

Utility Network; Utility Network Layer
trace_config_name
[trace_config_name,...]

The trace configuration or configurations to export.

String
out_json_file

The output .json file.

File

Code sample

ExportTraceConfigurations example (Python window)

This sample script exports a single trace configuration called Downstream Protective RTM001, identified by its global ID, from a utility network called ElecNetwork.

import arcpy
arcpy.ExportTraceConfigurations_un("ElecNetwork", 
                                   "{280F4D15-DACB-45D5-9E4C-7FF474E902E1}", 
                                   r"C:\temp\exportedtraceconfigurations.json")

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics