com.esri.arcgis.networkanalysis
Interface INetworkBuilder2

All Superinterfaces:
INetworkBuilder, Serializable
All Known Implementing Classes:
INetworkBuilder2Proxy

public interface INetworkBuilder2
extends INetworkBuilder, Serializable

Provides access to members that rebuild the logical network index for an existing geometric network.

Remarks

The INetworkBuilder2 interface provides access to methods that allow the addition and removal of weights from an existing geometric network.

Product Availability

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


Method Summary
 void addWeightToNetwork(IGeometricNetwork geometricNetwork, String weightName, int weightType, int bitGateSize, ISet weightAssociations)
          Adds a weight to an existing the geometric network, features are not changed in this process.
 void deleteWeightFromNetwork(IGeometricNetwork pGeometricNetwork, String weightName)
          Deletes a weight from an existing the geometric network, features are not changed in this process.
 
Methods inherited from interface com.esri.arcgis.networkanalysis.INetworkBuilder
rebuildNetwork
 

Method Detail

addWeightToNetwork

void addWeightToNetwork(IGeometricNetwork geometricNetwork,
                        String weightName,
                        int weightType,
                        int bitGateSize,
                        ISet weightAssociations)
                        throws IOException,
                               AutomationException
Adds a weight to an existing the geometric network, features are not changed in this process.

Remarks

The AddWeightToNetwork method will add a weight to the geometric network with the specified name and the type. Additionally, the weight associations will be created for all feature class and field pairings that are specified in the weightAssociations parameter.

The weightAssociations parameter is a set of StringPair objects. A StringPair is a set of strings where the first string represents the class name, the second the field name. Both must be supplied for the StringPair to be valid. Fully qualified strings are supported.

When specifying a weightType not of type esriWTBitGate, set the bitGateSize parameter to 0.

If the network is on SDE and is versioned, the addition of the weight will be reflected across all versions of the geometric network. The AddWeightToNetwork method will not act upon the features in the network, no snapping will occur and no orphan junction features will be created.

Weights cannot be specified under the following circumstances:


~ for any field on the orphan junction feature class
~ for either the Enabled or Ancillary Role fields
~ for any field that is already associated with a weight

An exclusive schema lock must be obtained before using the AddWeightToNetwork method. See the ISchemaLock interface for information on listing existing schema locks and obtaining an exclusive schema lock.

Product Availability

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

Parameters:
geometricNetwork - A reference to a com.esri.arcgis.geodatabase.IGeometricNetwork (in)
weightName - The weightName (in)
weightType - A com.esri.arcgis.geodatabase.esriWeightType constant (in)
bitGateSize - The bitGateSize (in)
weightAssociations - A reference to a com.esri.arcgis.system.ISet (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

deleteWeightFromNetwork

void deleteWeightFromNetwork(IGeometricNetwork pGeometricNetwork,
                             String weightName)
                             throws IOException,
                                    AutomationException
Deletes a weight from an existing the geometric network, features are not changed in this process.

Remarks

The DeleteWeightToNetwork method is not currently implemented.

Product Availability

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

Parameters:
pGeometricNetwork - A reference to a com.esri.arcgis.geodatabase.IGeometricNetwork (in)
weightName - The weightName (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.