This document is archived and information here might be outdated.  Recommended version.


INALocator3.ExcludeRestrictedElements Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (NetworkAnalyst)  

INALocator3.ExcludeRestrictedElements Property

Indicates whether to exclude restricted portions of the network when locating points.

[Visual Basic .NET]
Public Property ExcludeRestrictedElements As Boolean
[C#]
public bool ExcludeRestrictedElements {get; set;}
[C++]
HRESULT get_ExcludeRestrictedElements(
  VARIANT_BOOL* excludeRestricted
);
[C++]
HRESULT put_ExcludeRestrictedElements(
  VARIANT_BOOL excludeRestricted
);
[C++]

Parameters excludeRestricted [out, retval] excludeRestricted is a parameter of type VARIANT_BOOL excludeRestricted [in] excludeRestricted is a parameter of type VARIANT_BOOL

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires Network Analyst Extension.

Remarks

When ExcludeRestrictedElements is set to true, the INALocator location queries will not return network locations that fall on restricted network elements. The reason a network element could be restricted due to a point, polyline or polygon barrier, restriction network attributes, and/or elements with a negative impedance value.

If you set ExcludeRestrictedElements to true, then before calling any of the query location methods, be sure to call INALocator3::CacheRestrictedElements in order to inform the NALocator of the restrictions of which the passed-in INAContext is currently aware.  Subsequently, if any changes are made to solver restrictions, solver impedance attributes or solver barriers, be sure to call CacheRestrictedElements so that the locator can avoid locating on restricted network elements.

Note that it is appropriate to locate barriers on restricted elements. Therefore, when loading barriers, ExcludeRestrictedElements should be set to false.  If loading is done via the NAClassLoader then the caller must call CacheRestrictedElements prior to using the NAClassLoader but the NAClassLoader will internally set ExcludeRestrictedElements to be false when loading any barrier NAClass.

See Also

INALocator3 Interface

.NET Samples

Closest facility solver (Code Files: frmClosestFacilitySolver) | ArcGIS Network Analyst extension Engine application (Code Files: frmLoadLocations) | Service area solver (Code Files: frmServiceAreaSolver) | Location-allocation solver (Code Files: frmLocationAllocationSolver) | Vehicle routing problem solver (Code Files: frmVRPSolver) | Origin-destination cost matrix solver (Code Files: frmODCostMatrixSolver) | Route layer (Code Files: Program)

.NET Related Topics

How to load data into a network analysis problem | How to setup, solve, and save a network analysis problem