This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IN > INetwork Interface > INetwork.CreateForwardStar Method (ArcObjects .NET 10.5 SDK) |
Creates a forward star cursor on the network index.
[Visual Basic .NET] Public Function CreateForwardStar ( _ ByVal honorState As Boolean, _ ByVal JunctionWeight As INetWeight, _ ByVal FromToEdgeWeight As INetWeight, _ ByVal ToFromEdgeWeight As INetWeight, _ ByVal turnWeight As INetWeight _ ) As IForwardStar
[C#] public IForwardStar CreateForwardStar ( bool honorState, INetWeight JunctionWeight, INetWeight FromToEdgeWeight, INetWeight ToFromEdgeWeight, INetWeight turnWeight );
[C++]
HRESULT CreateForwardStar(
VARIANT_BOOL honorState,
INetWeight* JunctionWeight,
INetWeight* FromToEdgeWeight,
INetWeight* ToFromEdgeWeight,
INetWeight* turnWeight,
IForwardStar** ForwardStar
);
[C++]
Parameters honorState [in] honorState is a parameter of type VARIANT_BOOL JunctionWeight [in]
JunctionWeight is a parameter of type INetWeight FromToEdgeWeight [in]
FromToEdgeWeight is a parameter of type INetWeight ToFromEdgeWeight [in]
ToFromEdgeWeight is a parameter of type INetWeight turnWeight [in]
turnWeight is a parameter of type INetWeight ForwardStar [out, retval]
ForwardStar is a parameter of type IForwardStar
CreateForwardStar generates an IForwardStar object that can be used for stepping through the network. The input parameters for the method are as follows:
HonorState refers to elements in your network that are enabled/disabled. If you set HonorState to True then the ForwardStar will only return elements that are not disabled. If you specify False then any element that is connected to the element you are accessing will return a ForwardStar.
The CreateForwardStar method requires weights as inputs. If you have a network without any weights or wish to traverse the network connectivity without considering weights, you can pass in null pointers for the weights:
// network is a reference to the INetwork interface
// forwardStar is declared as IForwardStar
// Create a forward star without referencing weights:
IForwardStar forwardStar=network.CreateForwardStar(true, null, null, null, null)
INetwork Interface | IForwardStar.QueryAdjacentEdge Method | IForwardStar.QueryAdjacentJunctions Method | IForwardStar.QueryAtTurns Method | IForwardStar.QueryAtTurn Method | IForwardStar.FindAdjacent Method | IForwardStar.QueryAdjacentEdges Method | IForwardStar.Network Property | IForwardStar.QueryAdjacentJunction Method | INetwork.CreateForwardStar Method