ArcObjects Library Reference (NetworkAnalysis)  

INetworkLoader.AddWeight Method

Adds a weight to the new geometric network.

[Visual Basic .NET]
Public Sub AddWeight ( _
    ByVal networkWeightName As String, _
    ByVal weightType As esriWeightType, _
    ByVal bitGateSize As Integer _
)
[C#]
public void AddWeight (
    string networkWeightName,
    esriWeightType weightType,
    int bitGateSize
);
[C++]
HRESULT AddWeight(
  BSTR networkWeightName,
  esriWeightType weightType,
  long bitGateSize
);
[C++]

Parameters

networkWeightName [in]   networkWeightName is a parameter of type BSTR weightType [in]

  weightType is a parameter of type esriWeightType

bitGateSize [in]   bitGateSize is a parameter of type long

Product Availability

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

Remarks

Weights must be created when the geometric network is created. To add a weight later on, the geometric network must be deleted and rebuilt.

The WeightType parameter determines which feature attributes can be associated to the weight. See the help on AddWeightAssociation for a list of types of feature attribute types that can be associated with each WeightType.

When specifying a WeightType not of type esriWTBitGate, set the BitGateSize parameter to 0.

For more information on Weights, please see the help for the NetWeight object.

See Also

INetworkLoader Interface | INetWeightAssociationEdit Interface | INetWeightAssociation Interface | INetWeightEdit Interface | INetWeight Interface