ArcObjects Library Reference

Statements - Set OD Cost Matrix Properties Snippet

Set OD cost matrix solver parameters.

[C#]

//<-- Snippet Start -->
// 

// Set OD cost matrix solver parameters, including settings for...
ESRI.ArcGIS.NetworkAnalyst.INAODCostMatrixSolver naODCostMatrixSolver = naSolver as ESRI.ArcGIS.NetworkAnalyst.INAODCostMatrixSolver;

// ...default cutoff
naODCostMatrixSolver.DefaultCutoff = Nothing;

// ...number of destinations to find
naODCostMatrixSolver.DefaultTargetDestinationCount = Nothing;

// ...output
naODCostMatrixSolver.OutputLines = ESRI.ArcGIS.NetworkAnalyst.esriNAOutputLineType.esriNAOutputLineStraight;

//<-- Snippet End -->
[Visual Basic .NET]

' <-- Snippet Start -->
' DESCRIPTION:

' Set OD cost matrix solver parameters, including settings for...
Dim naODCostMatrixSolver As ESRI.ArcGIS.NetworkAnalyst.INAODCostMatrixSolver = CType(naSolver, ESRI.ArcGIS.NetworkAnalyst.INAODCostMatrixSolver)

' ...default cutoff
naODCostMatrixSolver.DefaultCutoff = Nothing 

' ...number of destinations to find
naODCostMatrixSolver.DefaultTargetDestinationCount = Nothing 

' ...output
naODCostMatrixSolver.OutputLines = ESRI.ArcGIS.NetworkAnalyst.esriNAOutputLineType.esriNAOutputLineStraight

' <-- Snippet End -->


Additional Requirements
  • The code in this document requires the following References added to the Visual Studio project:
  • ESRI.ArcGIS.NetworkAnalyst