ArcObjects Library Reference (GeoDatabase)  

INetwork.CreateForwardStar Method

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

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

[C#]

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)

See Also

INetwork Interface | IForwardStar.QueryAtTurn Method | IForwardStar.QueryAtTurns Method | IForwardStar.QueryAdjacentJunctions Method | IForwardStar.QueryAdjacentEdge Method | INetwork.CreateForwardStar Method | IForwardStar.QueryAdjacentJunction Method | IForwardStar.QueryAdjacentEdges Method | IForwardStar.FindAdjacent Method | IForwardStar.Network Property