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


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

IFlagDisplay 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

Use the IFlagDisplay interface to specify the feature on which a flag object is located. Using this interface, you can also specify the coordinates and symbology for the flag object.

Members

Name Description
Read/write property ClientClassID User-specified client class ID of this flag.
Read/write property ClientFID User-specified feature ID of the flag.
Read/write property FeatureClassID Feature class ID of the element on which the flag is placed.
Read/write property FID Feature ID of the network element on which the flag is placed.
Read/write property Geometry Point object containing the flag's coordinates.
Read/write property SubID Sub ID of the network element on which the flag is placed.
Read/write property Symbol Symbol used to display the flag.

Classes that implement IFlagDisplay

Classes Description
EdgeFlagDisplay A container for defining and displaying a network flag or barrier on an edge feature of a network.
JunctionFlagDisplay A container for defining and displaying a network flag or barrier on a junction feature of a network.

Remarks

Flags need to be created on features in a geometric network. Using the IFlagDisplay interface you can specify which features have a flag on them. Flags need to be created differently depending on whether they are on edge features or junction features.

[C#]

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

  IJunctionFlagDisplay junctionFlagDisplay = new JunctionFlagDisplayClass() as IJunctionFlagDisplay;

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

  IEdgeFlagDisplay edgeFlagDisplay = new EdgeFlagDisplayClass() as IEdgeFlagDisplay;

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

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 a network element ID (EID) by calling INetElements::QueryIDs.

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

  IFlagDisplay flagDisplay = junctionFlagDisplay as IFlagDisplay;
flagDisplay.FeatureClassID = userClassID;
flagDisplay.FID = userID;
flagDisplay.SubID = userSubID;

The utility network analysis extension now needs to know about this flag to use it in any tracing functions. You can add the flag to the extensions using the INetworkAnalysisExtFlags interface.

[C++]

Once the EdgeFlagDisplay or JunctionFlagDisplay object is created, you need to get a reference to the IFlagDisplay interface to specify to which feature the flag belongs. This requires knowing three items about a feature:

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 a network element ID (EID) by calling INetElements::QueryIDs.

 

The utility network analysis extension now needs to know about this flag to use it in any tracing functions. You can add the flag to the extensions using the INetworkAnalysisExtFlags interface.

[Visual Basic .NET]

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

  Dim junctionFlagDisplay As IJunctionFlagDisplay = New JunctionFlagDisplay

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

  Dim edgeFlagDisplay As IEdgeFlagDisplay = New EdgeFlagDisplay

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

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 a network element ID (EID) by calling INetElements::QueryIDs.

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

  Dim flagDisplay As IFlagDisplay = CType(junctionFlagDisplay, IFlagDisplay)
flagDisplay.FeatureClassID = userClassID
flagDisplay.FID = userID
flagDisplay.SubID = userSubID

The utility network analysis extension now needs to know about this flag to use it in any tracing functions. You can add the flag to the extensions using the INetworkAnalysisExtFlags interface.

See Also

IEdgeFlagDisplay Interface | IFlagDisplay Interface | IJunctionFlagDisplay Interface | INetworkAnalysisExtFlags Interface

.NET Samples

Custom upstream trace task