Summary
Exports subnetworks from a utility network into a JSON file. This tool also allows you to delete a row in the Subnetworks table as long as the Is deleted attribute is set to true. This indicates that the subnetwork controller has been removed from the subnetwork.
Usage
The subnetworks must be clean; run the Update Subnetwork tool first.
The parameters in the Trace Parameters category can only be executed via Python.
- The following requirements must be met when working with an
enterprise geodatabase:
- The Input Utility Network parameter must be from a utility network service.
When the Set export acknowledged parameter is enabled, the following must be true:
The network topology must be enabled.
- Enterprise geodatabases have the following additional requirements:
- This tool must be executed when connected to the default version.
- The connected ArcGIS Enterprise portal account must be the portal utility network owner.
At ArcGIS Pro 2.3, the following parameters are added: Include Geometry, Result Types, Result Network Attributes, and Result Fields. When these parameters are used, the output JSON file format will vary. These parameters require ArcGIS Enterprise 10.7 or later when used with an enterprise geodatabase. Review the output JSON response syntax.
Syntax
ExportSubnetwork(in_utility_network, domain_network, tier, subnetwork_name, export_acknowledged, out_json_file, {condition_barriers}, {function_barriers}, {include_barriers}, {traversability_scope}, {propagators}, {include_geometry}, {result_types}, {result_network_attributes}, {result_fields})
Parameter | Explanation | Data Type |
in_utility_network | The utility network that contains the subnetwork to export. | Utility Network; Utility Network Layer |
domain_network | The domain network that contains the subnetwork. | String |
tier | The tier that contains the subnetwork. | String |
subnetwork_name | The name of the subnetwork to export. Select a specific source to export the corresponding subnetwork information. | String |
export_acknowledged | Specifies whether the LASTACKEXPORTSUBNETWORK attribute for the corresponding controller in the Subnetworks table and feature in the SubnetLine feature class is updated.
| Boolean |
out_json_file | The name and location of the JSON file to be generated. | File |
condition_barriers [[Name, Operator, Type, Value, Combine Using],...] (Optional) | Sets a traversability barrier condition on features based on a comparison to a network attribute or check for a category string. A condition barrier uses a network attribute, an operator and a type, and an attribute value. For example, stop a trace when a feature has the attribute Device Status equal to the specific value of Open. When a feature meets this condition, the trace stops. If you're using more than one attribute, you can use the Combine using parameter to define an And or an Or condition. Condition barrier components are as follows:
The condition barrier operator values are as follows:
The condition barrier type options are as follows:
The Combine Using values are as follows:
Note:This parameter is only available via Python. | Value Table |
function_barriers [[Function, Attribute, Operator, Value, Use Local Values],...] (Optional) |
Sets a traversability barrier on features based on a function. Function barriers can be used to do such things as restrict how far the trace travels from the starting point, or set a maximum value to stop a trace. For example, the length of each line traveled is added to the total distance traveled so far. When the total length traveled reaches the value specified, the trace stops. Function barrier components are as follows:
Possible values for the function barrier function options are as follows:
For example, there is a starting point feature with a value of 20. The next feature has a value of 30. If you use the minimum function, the result is 20, maximum is 30, add is 50, average is 25, count is 2, and subtract is -10. The function barrier operator value options are as follows:
Note:This parameter is only available via Python. | Value Table |
include_barriers (Optional) | Specifies whether the traversability barrier features are included in the trace results. Traversability barriers are optional even if they have been preset in the subnetwork definition.
Note:This parameter is only available via Python. | Boolean |
traversability_scope (Optional) | Specifies the type of traversability to enforce. Traversability scope dictates whether traversability is enforced at junctions, edges, or both. For example, if a condition barrier is defined to stop the trace if DEVICESTATUS is set to Open and the traversability scope is set to edges only, the trace would not stop even if the trace encounters an open device, because DEVICESTATUS is only applicable for junctions. In other words, this parameter indicates to the trace whether to ignore junctions, edges, or both.
Note:This parameter is only available via Python. | String |
propagators [[Attribute, Substitution Attribute, Function, Operator, Value],...] (Optional) |
Specifies the network attributes to propagate as well as how that propagation should occur during a trace. Propagated class attributes denote the key values on subnetwork controllers that are disseminated to the rest of the features in the subnetwork. For example, in an electric distribution model, you can propagate the phase value. Propagators components are as follows:
Possible values for the propagators function are as follows:
The propagator operator values are as follows:
Note:This parameter is only available via Python. | Value Table |
include_geometry (Optional) | Specifies whether to include the geometry in the results.
Note:For enterprise geodatabases, this parameter requires ArcGIS Enterprise 10.7 or later. | Boolean |
result_types [result_types,...] (Optional) | Specifies the type of results to export.
Note:For enterprise geodatabases, this parameter requires ArcGIS Enterprise 10.7 or later.
| String |
result_network_attributes [result_network_attributes,...] (Optional) | The network attributes that will be included in the results. Note:For enterprise geodatabases, this parameter requires ArcGIS Enterprise 10.7 or later. | String |
result_fields [[Feature Class, Field Name],...] (Optional) | Fields from a feature class that will be returned as results. The values of the field will be returned in the results for the features in the subnetwork. Note:For enterprise geodatabases, this parameter requires ArcGIS Enterprise 10.7 or later. | Value Table |
Derived Output
Name | Explanation | Data Type |
out_utility_network | The updated utility network. | Utility Network |
Code sample
Export the corresponding subnetwork information for a source named RMT002 to a JSON file.
import arcpy
arcpy.ExportSubnetwork_un("Utility Network", "ElectricDistribution",
"Medium Voltage", "RMT002", "ACKNOWLEDGE",
"C:\\Temp\\RMT002clean.json")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes