This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > NetworkAnalysis > ESRI.ArcGIS.NetworkAnalysis > Interfaces > IF > IFlagDisplay Interface (ArcObjects .NET 10.5 SDK) |
Provides access to members that specify the network element on which a flag is located.
Description | ||
---|---|---|
ClientClassID | User-specified client class ID of this flag. | |
ClientFID | User-specified feature ID of the flag. | |
FeatureClassID | Feature class ID of the element on which the flag is placed. | |
FID | Feature ID of the network element on which the flag is placed. | |
Geometry | Point object containing the flag's coordinates. | |
SubID | Sub ID of the network element on which the flag is placed. | |
Symbol | Symbol used to display the flag. |
CoClasses and 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. |
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.
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.
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.
IEdgeFlagDisplay Interface | IFlagDisplay Interface | IJunctionFlagDisplay Interface | INetworkAnalysisExtFlags Interface