Summary
Sets the flow direction for a geometric network based on either the digitized direction or the source/sink settings in the geometric network.
Usage
Unlike the Utility Network Analysis toolbar, this tool allows you to set flow direction based on the digitized direction of network edges in addition to the sources/sinks defined in your network.
Learn more about flow_direction_in_a_geometric_networkFlow direction must be set within an edit session. If one is not active when the tool is run, this tool will start an edit session.
Geometric networks in enterprise geodatabases must be registered as versioned in order for this tool to be used.
This tool does not honor selections; flow is set on every edge in the geometric network.
This tool can only be run with Foreground processing, it cannot be run using Background processing.
Unlike other datasets, such as topology or network datasets, geometric networks do not have an associated layer. Therefore, when using this tool in ArcMap, the geometric network must be selected from disk. There is no option to select the geometric network from a layer drop-down list as input to the tool.
Syntax
SetFlowDirection_management (in_geometric_network, flow_option)
Parameter | Explanation | Data Type |
in_geometric_network | The geometric network for which flow will be set. | Geometric Network |
flow_option | Indicates method by which flow direction will be established; there is no default value.
| String |
Code sample
SetFlowDirection example (stand-alone script)
The following stand-alone Python script demonstrates how to use the SetFlowDirection in a Python script to set flow direction for a geometric network.
# Import arcpy module
import arcpy
# Local variables:
Water_Net = "C:/testing/GeometricNetworks/Montgomery.gdb/Water/Water_Net"
# Process: Set Flow Direction
arcpy.SetFlowDirection_management(Water_Net, "WITH_DIGITIZED_DIRECTION")
Environments
This tool does not use any geoprocessing environments.
Licensing information
- ArcGIS Desktop Basic: No
- ArcGIS Desktop Standard: Yes
- ArcGIS Desktop Advanced: Yes