This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Statements - Set Closest Facility Properties Snippet (ArcObjects .NET 10.4 SDK) |
Set closest facility solver parameters.
//<-- Snippet Start --> // DESCRIPTION: // Set closest facility solver parameters, including settings for... ESRI.ArcGIS.NetworkAnalyst.INAClosestFacilitySolver naClosestFacilitySolver=naSolver as ESRI.ArcGIS.NetworkAnalyst.INAClosestFacilitySolver; // ...default cutoff naClosestFacilitySolver.DefaultCutoff=Nothing; // ...number of facilities to find naClosestFacilitySolver.DefaultTargetFacilityCount=1; // ...travel direction naClosestFacilitySolver.TravelDirection=ESRI.ArcGIS.NetworkAnalyst.esriNATravelDirection.esriNATravelDirectionToFacility; // ...output naClosestFacilitySolver.CreateTraversalResult=true; naClosestFacilitySolver.OutputLines=ESRI.ArcGIS.NetworkAnalyst.esriNAOutputLineType.esriNAOutputLineTrueShape; //<-- Snippet End -->
'<-- Snippet Start --> ' DESCRIPTION: ' Set closest facility solver parameters, including settings for... Dim naClosestFacilitySolver As ESRI.ArcGIS.NetworkAnalyst.INAClosestFacilitySolver=CType(naSolver, ESRI.ArcGIS.NetworkAnalyst.INAClosestFacilitySolver) ' ...default cutoff naClosestFacilitySolver.DefaultCutoff=Nothing ' ...number of facilities to find naClosestFacilitySolver.DefaultTargetFacilityCount=1 ' ...travel direction naClosestFacilitySolver.TravelDirection=ESRI.ArcGIS.NetworkAnalyst.esriNATravelDirection.esriNATravelDirectionToFacility ' ...output naClosestFacilitySolver.CreateTraversalResult=True naClosestFacilitySolver.OutputLines=ESRI.ArcGIS.NetworkAnalyst.esriNAOutputLineType.esriNAOutputLineTrueShape '-- Snippet End -->