This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INALocator3 Interface > INALocator3.ExcludeRestrictedElements Property (ArcObjects .NET 10.4 SDK) |
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
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.