Individual Flow Direction Command

Description:

The Individual Flow Direction command illustrates how to get and set flow direction for individual edge elements in utility networks. This command opens a dialog box showing the current flow direction setting for the specified edge element(s). If an edit session is in progress, the user can also set the flow direction for any or all of the selected edge elements.

How to use:
  1. Start ArcMap and add a geometric network. Add the Utility Network Analyst toolbar.
  2. Browse and select the IndivFlowDir.dll using the 'Add From File' button on the customization dialog.
  3. From the 'Developer Samples' commands category, add the 'Individual Flow Direction' command to the Utility Network Analyst toolbar's Flow menu.
  4. If you wish to set flow direction, add the Editor toolbar, and start editing.
  5. Select some edge features. Click the Individual Flow Direction command to open the dialog.
  6. Select an element ID from the list to view the current flow direction for that element. If the "Flash chosen edge EIDs..." checkbox is checked, the selected edge elements will flash in the map. Checking this checkbox also flashes these selected edge elements. For performance considerations, the number of edge elements that are flashed is controlled by the text box at the bottom of the window. If there are more elements selected in the list than the text box specifies, no edge elements will flash.
  7. If an edit session is in progress, the flow direction for the selected edge elements in the list can be set by clicking on the flow direction option buttons. The dialog box keeps a local copy of the flow direction for the edge elements in the list. Clicking the flow direction option buttons writes the changes in flow direction to this local copy. Changes are not written to the edit session until Apply or OK is clicked. Clicking Revert will restore the local copy of the flow direction to match the state of the flow direction in this current edit session. The flow direction option buttons will also be reset to reflect this state.
  8. Click Cancel to close the dialog without changing the flow direction, or click OK to close the dialog writing your flow direction changes to the edit session.

Application:
ArcMap

Requires: A geometric network. If you would like to set flow direction an edit session is also required.

Difficulty: Intermediate


Visual Basic
File Description
clsIFDCommand.cls Class file containing the Individual Flow Direction command.
frmFlowDirDialog.frm Form containing the GUI for the command.
IndivFlowDir.vbp The project file for the Individual Flow Direction command.
IndivFlowDir.dll The compiled Individual Flow Direction command.


Key CoClasses: UtilityNetworkAnalysisExt, UtilityNetwork, EnumNetEIDArray, EIDHelper, EIDInfo
Key Interfaces: INetworkAnalysisExt, IUtilityNetwork, IEnumNetEID, IEnumNetEIDBuilder, IEIDHelper, IEIDInfo
Key Members: INetworkAnalysisExt::CurrentNetwork, IUtilityNetwork::SetFlowDirection, IUtilityNetwork::GetFlowDirection, IEnumNetEIDBuilder::Add, IEIDHelper::CreateEnumEIDInfo, IEIDInfo::Geometry