Network Analysis service GetSolverParameters method
Gets the default solver parameters for the specified network analysis layer.
GetSolverParameters(string NALayerName)
Parameter |
Description |
---|---|
NALayerName |
The layer name on which to return a network solver parameters. |
Return Value
A NAServerSolverParams object containing the default solver parameters for the network layer defined. This is an abstract class. The concrete objects include: NAServerClosestFacilityParams, NAServerLocationAllocationParams, NAServerODCostMatrixParams, NAServerRouteParams, NAServerServiceAreaParams and NAServerVRPParams.
Remarks
The solver properties include "FindBestOrder", "Breaks", "ShapeType", etc. These properties can be modified and passed to the Solve method to change a network analysis operation.
Examples
C#
// Connect to server
NAService_NAServer naService = new NAService_NAServer();
naService.Url = "http://localhost:6080/ArcGIS/services/NetworkAnalysisService/MapServer/NAServer");
// Get Route layers
string[] routeLayers = naService.GetNALayerNames(esriNAServerLayerType.esriNAServerRouteLayer);
// Get the default settings for the first route layer
NAServerRouteParams naServerRouteParams = (NAServerRouteParams)naService.GetSolverParameters(routeLayers[0]);
2/28/2020