This document is archived and information here might be outdated.  Recommended version.


INetFlag Interface (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalysis > ESRI.ArcGIS.NetworkAnalysis > Interfaces > IN > INetFlag Interface
ArcGIS Developer Help

INetFlag Interface

Provides access to members that specify the network element on which a flag is located.

Product Availability

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

When To Use

When you create either an edge flag or junction flag you have a reference to the INetFlaginterface of that flag. Through this object you can set the flag to your network for a tracing operation.

Members

Name Description
Read/write property ClientClassID User-specified client class ID of this flag.
Read/write property ClientID User-specified client ID of this flag.
Read/write property Label Label of this flag.
Read/write property UserClassID User class ID of the network element on which this flag is placed.
Read/write property UserID User ID of the network element on which this flag is placed.
Read/write property UserSubID User sub ID of the network element on which this flag is placed.

Classes that implement INetFlag

Classes Description
EdgeFlag A container for defining a network flag on an edge element for a trace flow solver.
JunctionFlag A container for defining a network flag on a junction element for a trace flow solver.

Remarks

Flags are the starting points of tracing operations on networks. Flags can either be placed on edges or junctions.

 

 

[C#]

The following code can be used to create a flag on a junction element:

  IJunctionFlag junctionFlag = new JunctionFlagClass() as IJunctionFlag;

The following code can be used to create a flag on an edge element:

  IEdgeFlag edgeFlag = new EdgeFlagClass() as IEdgeFlag;

Once either flag object is created, you need to get a reference to the INetFlag interface to specify to which network element the flag belongs. This requires knowing three items about a network element:

1. UserClassID - This is the ID of the feature class which the feature belongs to.

2. UserID - This is the ID of the feature within the feature class.

3. UserSubID - This is the ID of an individual element within a feature.

These three properties can be queried from an element ID (EID) by calling INetElements::QueryIDs.

Using the junction flag as an example we can populate the parameters of the object:

  INetFlag netFlag = junctionFlag as INetFlag;
netFlag.set_UserClassID = userClassID;
netFlag.set_UserID = userID;
netFlag.set_UserSubID = userSubID;

The TraceFlowSolver object needs to know about this flag before it can use it in any tracing functions. Once you have created all your flags for your trace, you can add them to the TraceFlowSolver object by calling PutEdgeOrigins or PutJunctionOrigins on the ITraceFlowSolver interface.

[C++]

Once the EdgeFlag or JunctionFlag object is created, you need to get a reference to the INetFlag interface to specify to which network element the flag belongs. This requires knowing three items about a network element:

1. UserClassID - This is the ID of the feature class which the feature belongs to.

2. UserID - This is the ID of the feature within the feature class.

3. UserSubID - This is the ID of an individual element within a feature.

These three properties can be queried from an element ID (EID) by calling INetElements::QueryIDs.

 

The TraceFlowSolver object needs to know about this flag before it can use it in any tracing functions. Once you have created all your flags for your trace, you can add them to the TraceFlowSolver object by calling PutEdgeOrigins or PutJunctionOrigins on the ITraceFlowSolver interface.

[Visual Basic .NET]

The following code can be used to create a flag on a junction element:

  Dim junctionFlag As IJunctionFlag = New JunctionFlag

The following code can be used to create a flag on an edge element:

  Dim edgeFlag As IEdgeFlag = New EdgeFlag

Once either flag object is created, you need to get a reference to the INetFlag interface to specify to which network element the flag belongs. This requires knowing three items about a network element:

1. UserClassID - This is the ID of the feature class which the feature belongs to.

2. UserID - This is the ID of the feature within the feature class.

3. UserSubID - This is the ID of an individual element within a feature.

These three properties can be queried from an element ID (EID) by calling INetElements::QueryIDs.

Using the junction flag as an example we can populate the parameters of the object:

  Dim netFlag As INetFlag = CType(junctionFlag, INetFlag)
netFlag.UserClassID = userClassID
netFlag.UserID = userID
netFlag.UserSubID = userSubID

The TraceFlowSolver object needs to know about this flag before it can use it in any tracing functions. Once you have created all your flags for your trace, you can add them to the TraceFlowSolver object by calling PutEdgeOrigins or PutJunctionOrigins on the ITraceFlowSolver interface.

See Also

INetFlag Interface | IJunctionFlag Interface | IEdgeFlag Interface

.NET Samples

Custom upstream trace task