This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalyst > ESRI.ArcGIS.NetworkAnalyst > Interfaces > IN > INASolverSettings Interface > INASolverSettings.RestrictionAttributeNames Property (ArcObjects .NET 10.5 SDK) |
The collection of network attribute names to be used as restrictions with the analysis.
[Visual Basic .NET] Public Property RestrictionAttributeNames As IStringArray
[C#] public IStringArray RestrictionAttributeNames {get; set;}
[C++]
HRESULT get_RestrictionAttributeNames(
IStringArray** AttributeName
);
[C++]
HRESULT putref_RestrictionAttributeNames(
IStringArray* AttributeName
);
[C++]
Parameters AttributeName [out, retval]
AttributeName is a parameter of type IStringArray AttributeName [in]
AttributeName is a parameter of type IStringArray
RestrictionAttributeNames provides access to an IStringArray with the list of attribute names being used as restrictions by a network analyst solver. For example, the route solver could solve the shortest path using both oneway restrictions and bridge height restrictions.
If the solver is not using any restriction attributes, this method will return a string array with 0 elements in it.
The get property returns a copy of the IStringArray. You must explicitly set the property after modifying the contents of the IStringArray.
This sample illustrates adding some additional attributes to use as restrictions:
IStringArray restrictionAttributeNames=naSolverSettings.RestrictionAttributeNames;
restrictionAttributeNames.Add("Oneway");
restrictionAttributeNames.Add("RestrictedTurns");
naSolverSettings.RestrictionAttributeNames=restrictionAttributeNames;