ArcGIS Network Analyst extension barrier location editor


Purpose
This sample demonstrates how to load polygon and polyline barrier values programmatically, while also providing a way to visualize and edit the underlying network element values that make up a polygon or polyline barrier.
This sample also illustrates how to flash the geometry of a network element (with a corresponding digitized direction arrow) and how to set up a context menu command for the NAWindow.

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.

  1. Compile the application. In non-XP Windows operating systems, be sure to open Visual Studio with "As Administrator."
  2. Start ArcMap.
  3. Create or load a network analysis layer.
  4. Create or load a polygon or polyline barrier.
  5. Right-click the barrier. On the context menu, choose Edit.
  6. Follow the directions on the Editing dialog box to edit the edge ranges and junctions that make up the barrier.

NABarrierLocationEditor.cs Entry point for the command.
EditorForm.cs Code for the editor form.
NABarrierLocationEditor.bmp Graphic icon for the command.
Download the C# files
NABarrierLocationEditor.vb Entry point for the command.
EditorForm.vb Code for the editor form.
NABarrierLocationEditor.bmp Graphic icon for the command.
Download the VB.NET files

Download the files for all languages

See Also:

Programming with the ArcGIS Network Analyst extension
What is ArcGIS Network Analyst extension?
What is a network dataset?
Geodatabase
About the ArcGIS Network Analyst extension tutorial
NetworkAnalyst
ArcGIS Network Analyst extension Object Model Diagram
An overview of the network analyst toolbox




Development licensing Deployment licensing
ArcGIS for Desktop Basic: Network Analyst ArcGIS for Desktop Basic: Network Analyst
ArcGIS for Desktop Standard: Network Analyst ArcGIS for Desktop Standard: Network Analyst
ArcGIS for Desktop Advanced: Network Analyst ArcGIS for Desktop Advanced: Network Analyst