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


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

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 | INetWeightEdit Interface | INetWeightAssociation Interface | INetWeightAssociationEdit Interface | INetWeight Interface | NetWeight Class