Partial Establish Flow Direction Command

Description:

The Partial Establish Flow Direction command illustrates how to create a custom flow direction solver for utility networks. This command uses junction flags to specify sources, and sets the flow direction using the IUtilityNetwork2::PartialEstablishFlowDirection() method. Only those edges that are reachable from the junction flags will have their flow direction set.

How to use:
  1. Start ArcMap and add a geometric network. Add the Utility Network Analyst toolbar.
  2. Browse and select the PartialEstFlowDir.dll using the 'Add From File' button on the customization dialog.
  3. From the 'Developer Samples' commands category, add the 'Partial Establish Flow Direction' command to the Utility Network Analyst toolbar.
  4. Add the Editor toolbar, and start editing.
  5. Optionally, set the Enabled value to False for those features through which flow cannot pass.
  6. Add a junction flag at each source.
  7. Click the command to establish flow direction based on the sources and the Enabled values of the features.

Application:
ArcMap

Requires: A geometric network; an edit session.

Minimum ArcGIS Version Required: 8.2

Difficulty: Intermediate


Visual Basic
File Description
clsPartialEstFlowDir.cls Class file containing the custom flow direction solver.
frmResources.frm Form containing bitmap resource for the command.
frmResources.frx Form binary file.
MyFlowDirSolver.vbp The project file for the custom flow direction solver.
PartialEstFlowDir.dll The compiled flow direction solver.


Key CoClasses: UtilityNetworkAnalysisExt, UtilityNetwork
Key Interfaces: INetworkAnalysisExt, INetworkAnalysisExtFlags, INetElements, IUtilityNetwork2
Key Members: INetworkAnalysisExt::CurrentNetwork, INetworkAnalysisExtFlags::JunctionFlag, INetworkAnalysisExtFlags::JunctionFlagCount, INetElements::GetEID, IUtilityNetwork2::PartialEstablishFlowDirection