Label | Explanation | Data Type |
Input Utility Network
| The utility network containing the named trace configuration or configurations to export. | Utility Network; Utility Network Layer |
Trace Configuration | The named trace configuration or configurations to export. | String |
Output File (.json) | The output .json file. | File |
Available with Standard or Advanced license.
Summary
Exports named trace configurations from a utility network to JSON format (.json file).
This tool can be used in conjunction with the Import Trace Configurations tool.
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 named trace configuration in the utility network. Other users can only view and export the named 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 name for the named trace configuration>", "description": "<property representing the description of the named 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"]" } ]
Parameters
arcpy.un.ExportTraceConfigurations(in_utility_network, trace_config_name, out_json_file)
Name | Explanation | Data Type |
in_utility_network | The utility network containing the named trace configuration or configurations to export. | Utility Network; Utility Network Layer |
trace_config_name [trace_config_name,...] | The named trace configuration or configurations to export. | String |
out_json_file | The output .json file. | File |
Code sample
This sample script exports a single named 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
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes