Update Subnetwork (Utility Network)

Summary

Updates subnetwork information in the Subnetworks table, the SubnetLine feature class, and subnetwork system diagrams for the specified subnetworks.

For the Subnetworks table, this tool changes the status of associated subnetwork controllers to clean (the Is dirty attribute is set to False). If validate consistency failures or subnetwork errors are discovered during tool operation, the status of the associated subnetwork controllers will be marked invalid (the Is dirty attribute is set to Invalid). In the SubnetLine feature class, a record for new subnetworks will be generated, the records for deleted subnetworks will be removed, and the shape and information for modified subnetworks will be updated. Certain attributes will also be created or updated for subnetwork features.

Learn more about how to update subnetworks

Usage

  • The following requirements must be met when working with an enterprise geodatabase:

    • The utility network must be registered as branch versioned.
    • The input utility network must be from a utility network service.
    • If this tool is run on the default version, and the Update subnetwork policy for the tier is configured to not manage the Is dirty attribute, the update subnetwork operation can be used to delete rows in the Subnetworks table where the Is deleted attribute is set to true.
    • If this tool is run on the default version, the geometry, subnetwork name attribute, and propagated fields of the SubnetLine feature class will be updated in place. If this tool is run on a named version, the default behavior (without events) limits updates to features and objects edited in the version. The edit mode can be changed to use events (with events). This option runs geodatabase behavior and can be set in the subnetwork definition for both the default version and named versions.

      Learn more about the edit mode used by the Update Subnetwork tool

    • License:
      The active portal account must be assigned a license with the ArcGIS Advanced Editing user type extension to use this tool in an enterprise deployment.

  • This tool creates or updates network diagrams for the updated subnetworks if a diagram template was specified when setting the subnetwork definition.

  • Any edits must be saved before running this tool.

  • The network topology must be enabled.

  • No dirty areas exist that intersect with subnetwork features.

Parameters

LabelExplanationData Type
Input Utility Network

The utility network that contains the subnetwork.

Utility Network; Utility Network Layer
Domain Network

The domain network that contains the subnetwork.

String
Tier

The tier that contains the subnetwork.

String
All subnetworks in tier
(Optional)

Specifies whether all subnetworks in the tier will be updated. To update a subset of subnetworks in the tier, use the Subnetwork Name parameter.

  • Checked—All subnetworks in the tier will be updated. This option uses asynchronous processing to update the subnetworks using the system UtilityNetworkTools geoprocessing service. The service is reserved for utility network geoprocessing tasks and has a longer default timeout setting. This is the default.
  • Unchecked—Only the subnetworks that are specified in the Subnetwork Name parameter will be updated.

Boolean
Subnetwork Name
(Optional)

The name of the subnetwork that will be updated from the tier. If all subnetworks will be updated using the All subnetworks in tier parameter, this parameter is ignored. When the subnetworks table contains 10,000 or more records for a tier, the parameter's choice list is not populated and an empty field is provided for the subnetwork name.

String
Continue on failure
(Optional)

Specifies whether the update process will stop if a subnetwork fails to update when updating multiple subnetworks.

  • Checked—The update process will not stop if a subnetwork failure occurs; it will continue.
  • Unchecked—The update process will stop if a subnetwork failure occurs. This is the default.

Boolean
Condition Barriers
(Optional)
Note:

This parameter is only available for Python.

Value Table
Function Barriers
(Optional)
Note:

This parameter is only available for Python.

Value Table
Include Barrier Features
(Optional)
Note:

This parameter is only available for Python.

Boolean
Apply Traversability To
(Optional)

Specifies the type of traversability that will be enforced. Traversability scope determines whether traversability will be enforced at junctions, edges, or both. For example, if a condition barrier is defined to stop the trace if DEVICESTATUS is equal to Open and traversability scope is set to edges only, the trace will not stop—even if the trace encounters an open device—because DEVICESTATUS is only applicable to junctions. In other words, this parameter indicates to the trace whether to ignore junctions, edges, or both.

  • Both junctions and edgesTraversability will be applied to both junctions and edges. This is the default.
  • Junctions onlyTraversability will be applied only to junctions.
  • Edges onlyTraversability will be applied only to edges.
Note:

This parameter is only available for Python.

String
Propagators
(Optional)
Note:

This parameter is only available for Python.

Value Table

Derived Output

LabelExplanationData Type
Updated Utility Network

The updated utility network.

Utility Network

arcpy.un.UpdateSubnetwork(in_utility_network, domain_network, tier, {all_subnetworks_in_tier}, {subnetwork_name}, {continue_on_failure}, {condition_barriers}, {function_barriers}, {include_barriers}, {traversability_scope}, {propagators})
NameExplanationData Type
in_utility_network

The utility network that contains the subnetwork.

Utility Network; Utility Network Layer
domain_network

The domain network that contains the subnetwork.

String
tier

The tier that contains the subnetwork.

String
all_subnetworks_in_tier
(Optional)

Specifies whether all subnetworks in the tier will be updated. To update a subset of subnetworks in the tier, use the subnetwork_name parameter.

  • ALL_SUBNETWORKS_IN_TIERAll subnetworks in the tier will be updated. This option uses asynchronous processing to update the subnetworks using the system UtilityNetworkTools geoprocessing service. The service is reserved for utility network geoprocessing tasks and has a longer default timeout setting. This is the default.
  • SPECIFIC_SUBNETWORKOnly the subnetworks that are specified in the subnetwork_name parameter will be updated.
Boolean
subnetwork_name
(Optional)

The name of the subnetwork that will be updated from the tier. If all subnetworks will be updated using the all_subnetworks_in_tier parameter, this parameter is ignored.

String
continue_on_failure
(Optional)

Specifies whether the update process will stop if a subnetwork fails to update when updating multiple subnetworks.

  • CONTINUE_ON_FAILUREThe update process will not stop if a subnetwork failure occurs; it will continue.
  • STOP_ON_FAILUREThe update process will stop if a subnetwork failure occurs. This is the default.
Boolean
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 Device Status attribute 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:

  • Name—Choose to filter by any network attribute defined in the system.
  • Operator—Choose from a number of different operators.
  • Type—Choose a specific value or network attribute from the value that is specified in the name parameter.
  • Value—Set a specific value of the input attribute type that will cause termination based on the operator value.
  • Combine Using—Set this value if you have multiple attributes to add. You can combine them using an And or an Or condition.

The condition barrier Operator values are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation where all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation where not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation where at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation where none of the bits in the value are present in the attribute (bitwise AND == False).

The condition barrier type options are as follows:

  • SPECIFIC_VALUEFilter by a specific value.
  • NETWORK_ATTRIBUTEFilter by a network attribute.

The Combine Using values are as follows:

  • ANDCombine the condition barriers.
  • ORUse if either condition barrier is met.

Learn more about using multiple conditional expressions

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:

  • Function—Choose from a number of different calculation functions.
  • Attribute—Choose to filter by any network attribute defined in the system.
  • Operator—Choose from a number of different operators.
  • Value—Set a specific value of the input attribute type that, if discovered, will cause the termination.
  • Use Local Values—Calculate values in each direction as opposed to an overall global value, for example, for a function barrier that is calculating the sum of Shape length in which the trace terminates if the value is greater than or equal to 4. In the global case, after you have traversed two edges with a value of 2, you have already reached a shape length sum of 4, so the trace stops. If local values are used, the local values along each path change, so the trace goes farther.

  • TRUELocal values will be used.
  • FALSEGlobal values will be used. This is the default.

Possible values for the function barrier function options are as follows:

  • AVERAGEThe average of the input values.
  • COUNTThe number of features.
  • MAXThe maximum of the input values.
  • MINThe minimum of the input values.
  • ADDAdd the values.
  • SUBTRACTSubtract the values. Subnetwork controllers and loops trace types do not support the subtract function.

For example, the starting point feature has 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:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation where all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation where not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation where at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation where none of the bits in the value are present in the attribute (bitwise AND == False).
Value Table
include_barriers
(Optional)

Specifies whether the traversability barrier features will be included in the trace results. Traversability barriers are optional even if they have been preset in the subnetwork definition.

  • INCLUDE_BARRIERSTraversability barriers will be included in the trace results. This is the default.
  • EXCLUDE_BARRIERSTraversability barriers will not be included in the trace results.
Boolean
traversability_scope
(Optional)

Specifies the type of traversability that will be enforced. Traversability scope determines whether traversability will be enforced at junctions, edges, or both. For example, if a condition barrier is defined to stop the trace if DEVICESTATUS is equal to Open and traversability scope is set to edges only, the trace will not stop—even if the trace encounters an open device—because DEVICESTATUS is only applicable to junctions. In other words, this parameter indicates to the trace whether to ignore junctions, edges, or both.

  • BOTH_JUNCTIONS_AND_EDGESTraversability will be applied to both junctions and edges. This is the default.
  • JUNCTIONS_ONLYTraversability will be applied only to junctions.
  • EDGES_ONLYTraversability will be applied only to edges.
String
propagators
[[Attribute, Substitution Attribute, Function, Operator, Value],...]
(Optional)

Specifies the network attributes to propagate as well as how that propagation will 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:

  • Attribute—Filter by any network attribute defined in the system.
  • Substitution Attribute—Use a substituted value instead of bitset network attribute values. Substitutions are encoded based on the number of bits in the network attribute being propagated. A substitution is a mapping of each bit in phase to another bit. For example, for Phase AC, one substitution could map bit A to B, and bit C to null. In this example, the substitution for 1010 (Phase AC) is 0000-0010-0000-0000 (512). The substitution captures the mapping so you know that Phase A was mapped to B and Phase C was mapped to null, and not the other way around (that is, Phase A was not mapped to null and Phase C was not mapped to B).
  • Function—Choose from a number of calculation functions.
  • Operator—Choose from a number of operators.
  • Value—Provide a specific value for the input attribute type that would cause termination based on the operator value.

The propagators function value options are as follows:

  • PROPAGATED_BITWISE_ANDCompare the values from one feature to the next.
  • PROPAGATED_MINGet the minimum value.
  • PROPAGATED_MAXGet the maximum value.

The propagators operator value options are as follows:

  • IS_EQUAL_TOThe attribute is equal to the value.
  • DOES_NOT_EQUALThe attribute is not equal to the value.
  • IS_GREATER_THANThe attribute is greater than the value.
  • IS_GREATER_THAN_OR_EQUAL_TOThe attribute is greater than or equal to the value.
  • IS_LESS_THANThe attribute is less than the value.
  • IS_LESS_THAN_OR_EQUAL_TOThe attribute is less than or equal to the value.
  • INCLUDES_THE_VALUESA bitwise AND operation where all bits in the value are present in the attribute (bitwise AND == value).
  • DOES_NOT_INCLUDE_THE_VALUESA bitwise AND operation where not all of the bits in the value are present in the attribute (bitwise AND != value).
  • INCLUDES_ANYA bitwise AND operation where at least one bit in the value is present in the attribute (bitwise AND == True).
  • DOES_NOT_INCLUDE_ANYA bitwise AND operation where none of the bits in the value are present in the attribute (bitwise AND == False).
Value Table

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network

Code sample

UpdateSubnetwork example 1 (Python window)

Update a specific subnetwork named RMT004.

import arcpy
arcpy.un.UpdateSubnetwork("Utility Network", "ElectricDistribution", 
                          "Medium Voltage", "SPECIFIC_SUBNETWORK", "RMT004", 
                          "CONTINUE_ON_FAILURE")
UpdateSubnetwork example 2 (Python window)

Update all subnetworks in the Medium Voltage tier.

import arcpy
arcpy.un.UpdateSubnetwork("Utility Network", "ElectricDistribution", 
                          "Medium Voltage", "ALL")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics