How to use
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.
- Open the solution file in Visual Studio.
- If your SDK is not installed in "\Program Files (x86)\ArcGIS\DeveloperKit10.1", search for that string and replace all entries with the correct path.
- Build the solution.
- If the compilation process does not register the CustomSolver.dll into ArcGIS for Desktop, register it manually.
- Start ArcMap.
- Add a network dataset to the map.
- On the Network Analyst toolbar, click Network Analyst > Options, and set it to show all messages.
- Open the Network Analyst toolbar and click Network Analyst > New Connectivity.
- Load locations into the Seed Points layer of the Connectivity analysis layer.
- Click Solve. Lines are added to the Lines layer that reference source features that are not connected to any of the seed points.
- Right-click the Connectivity layer and click Properties to change the properties of the analysis layer, including whether you want to output the connected features instead of the disconnected features and whether or not you want to generate the line geometry.
- Re-solve to see the effects of changing the analysis layer properties.
ConnectivitySolver.h | Header file for defining the connectivity solver. |
ConnectivitySolver.cpp | Implementation of the connectivity solver. |
ConnectivitySymbolizer.h | Header file for defining the connectivity solver's custom symbolizer. |
ConnectivitySymbolizer.cpp | Implementation of the connectivity solver's custom symbolizer. |
ConnSolverPropPage.h | Header file for defining the connectivity solver's custom property page. |
ConnSolverPropPage.cpp | Implementation of the connectivity solver's custom property page. |
DataStructures.h | Header file for defining custom data structures. |
NameConstants.h | Header file for defining custom string values. |
Resource.h | Header file for defining resource IDs. |
StdAfx.h | Used for building a precompiled header file and precompiled type file. |
StdAfx.cpp | Used for building a precompiled header file and precompiled type file. |
CustomSolver.cpp | Object map and DLL exports. |
CustomSolver.rc | Contains a listing of all the Microsoft Windows resources that the program uses. |
CustomSolver.rgs | Registration script for the custom solver project. |
_CustomSolver_i.c | GUID definitions for the project. |
Download the files for all languages
Development licensing | Deployment licensing |
---|---|
ArcGIS for Desktop Basic | ArcGIS for Desktop Basic: Network Analyst |
ArcGIS for Desktop Standard | ArcGIS for Desktop Standard: Network Analyst |
ArcGIS for Desktop Advanced | ArcGIS for Desktop Advanced: Network Analyst |