This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IN > INetworkForwardStarEx Interface > INetworkForwardStarEx.AddEdgeRestriction Method (ArcObjects .NET 10.4 SDK) |
Restricts the traversability of a range on an edge element in the adjacency queries.
[Visual Basic .NET] Public Sub AddEdgeRestriction ( _ ByVal Edge As INetworkEdge, _ ByVal fromPosition As Double, _ ByVal toPosition As Double _ )
[C#] public void AddEdgeRestriction ( INetworkEdge Edge, double fromPosition, double toPosition );
[C++]
HRESULT AddEdgeRestriction(
INetworkEdge* Edge,
double fromPosition,
double toPosition
);
[C++]
Parameters Edge [in]
Edge is a parameter of type INetworkEdge fromPosition [in] fromPosition is a parameter of type double toPosition [in] toPosition is a parameter of type double
AddEdgeRestriction restricts a given range for the input edge. Multiple, disjoint partial-edge restrictions may be applied to the same edge. The RemoveElementRestrictions method can be used for removing all element-specific restrictions.
If the traversal cannot enter the edge from the atJunction of a QueryAdjacencies call due to partial (or whole) edge restrictions, then the edge will not be included in the NetworkForwardStarAdjacencies object.
AddJunctionRestriction, AddEdgeRestriction, and AddTurnRestriction are intended as a replacement to INetworkForwardStarSetup::Traversable, as well as the related INetworkForwardStar::SetAllTraversable, INetworkForwardStarSetup::SetTraversable, and INetworkForwardStarSetup::NonTraversableElements.