Set flow by digitized direction


PurposeThe Set Flow by Digitized Direction sample is an ArcMap add-in that shows how to create a custom flow direction solver button for utility networks. This button sets the flow direction for each edge feature in the network along the direction in which the feature was digitized.


How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

Adding the button to ArcMap
  1. Open the .sln file in Visual Studio and compile it.
  2. Start ArcMap and make the Utility Network Analyst toolbar visible.
  3. Click the Customize menu and click Customize Mode. The Customize dialog box opens.
  4. Click the Commands tab.
  5. In the Categories list, click Add-in Developer Samples. Set Flow by Digitized Direction is listed under Commands.
  6. Drag the command button onto the Utility Network Analyst toolbar.

Using the button to set the flow direction
  1. Add a geometric network to ArcMap.
  2. Start editing.
  3. Click the button to set the flow according to the digitized direction of the features.
  4. Stop editing and save your edits.

SetFlowByDigitizedDirectionCSharp.cs Class file containing the custom flow direction solver.
Download the C# files
SetFlowByDigitizedDirectionVBNET.vb Class file containing the custom flow direction solver.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
ArcEditor ArcEditor
ArcInfo ArcInfo