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.
- Start Visual Studio, open the solution file, then build the solution.
- Start ArcCatalog and select an appropriate network dataset to work with.
- Add a new restriction attribute to the network dataset.
- Set SelectionRestriction as the evaluator type for all participating network sources for this new restriction attribute.
- Start ArcMap and add your network dataset to the map.
- Click Yes when prompted, to add the network dataset's source feature classes to the map.
- Create a new network analysis layer and make sure that your new restriction is selected under the Analysis Settings tab of the analysis layer's property pages.
- Create a selection of the features that you want to restrict from your analysis.
- Solve your network analysis layer.
SelectionRestrictionEvaluator.cs | The custom evaluator. |
SelectionRestrictionEvaluatorEditor.cs | The custom evaluator editor. |
SelectionRestrictionEvaluator.vb | The custom evaluator. |
SelectionRestrictionEvaluatorEditor.vb | The custom evaluator editor. |
Download the files for all languages
See Also:
Programming with Network AnalystWhat is Network Analyst?
What is a network dataset?
Geodatabase
About the Network Analyst tutorial
NetworkAnalyst
Network Analyst Object Model Diagram
An overview of the network analyst toolbox
Development licensing | Deployment licensing |
---|---|
ArcView: Network Analyst | ArcView: Network Analyst |
ArcEditor: Network Analyst | ArcEditor: Network Analyst |
ArcInfo: Network Analyst | ArcInfo: Network Analyst |