Load network layer from active analysis to the table of contents


PurposeNetwork analysis layers can be opened in ArcMap without loading their corresponding network layer. This add-in interrogates a network analysis layer to determine its associated network dataset, then the network dataset is loaded to the map as a network layer.

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. Start Visual Studio and open the solution.
  2. Compile the solution.
  3. Start ArcMap.
  4. Click Customize, then Customize Mode.
  5. Click the Commands tab.
  6. Scroll down to Network Analyst.
  7. Drag the command onto the Network Analyst toolbar.
  8. Load a network analysis layer to the map.
  9. Click the command button to load the network layer.

LoadNetworkLayerFromActiveAnalysisToTOC.cs Main code file for this add-in.
Config.esriaddinx Add-in configuration file.
Download the C# files
LoadNetworkLayerFromActiveAnalysisToTOC.vb Main code file for this add-in.
Config.esriaddinx Add-in configuration file.
Download the VB.NET files

Download the files for all languages

See Also:

Programming with 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 Advanced: Network Analyst ArcGIS for Desktop Advanced: Network Analyst
ArcGIS for Desktop Standard: Network Analyst ArcGIS for Desktop Standard: Network Analyst
ArcGIS for Desktop Basic: Network Analyst ArcGIS for Desktop Basic: Network Analyst