Interface INetworkBuild
- Namespace
- ESRI.ArcGIS.Geodatabase
- Assembly
- ESRI.Server.Geodatabase.dll
Provides access to members for changing the schema of a network dataset and building it.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("99CA1A8E-0301-4089-B939-1634E45F14A3")]
public interface INetworkBuild
Remarks
The INetworkBuild interface is used to make schema edits to the network dataset; adding or removing of sources and attributes. Schema edits to the network dataset can be made two ways; directly adding or removing sources and attributes or by editing the data element and using the UpdateSchema method. The INetworkBuild interface is also the interface to use for building the network dataset.
Geodatabase network datasets can contain any number of edge, junction and turn sources. Geodatabase network datasets also contain a system junction source which is a system managed source that is used to manage connectivity within the network dataset. Shapefile network datasets can only contain one edge source, any number of turn sources, and the system junction source.
Methods
AddAttribute(INetworkAttribute)
Adds the given attribute to the schema of the network dataset.
void AddAttribute(INetworkAttribute Attribute)
Parameters
AttributeINetworkAttribute
Remarks
The AddAttribute method is used to add an attribute to the network dataset. After calling AddAttribute, the network needs to be rebuilt in order to reflect the change.
AddSource(INetworkSource)
Adds the given source to the schema of the network dataset.
void AddSource(INetworkSource Source)
Parameters
SourceINetworkSource
Remarks
The AddSource method is used to add a feature class to the network dataset. Depending on the source being added to the network dataset, different properties may be specified. While turn sources require no additional parameters, edge and junction sources require a connectivity policy and group and optionally can have elevation fields defined.
Object classes, tables and non-simple feature classes, such as annotation, dimension, geometric network feature classes and feature classes already in a network dataset cannot be added to a network dataset. After calling AddSource, the network needs to be rebuilt in order to reflect the change.
BuildNetwork(IEnvelope)
Builds the network dataset for the given extent.
IEnvelope BuildNetwork(IEnvelope areaToBuild)
Parameters
areaToBuildIEnvelope
Returns
Remarks
BuildNetwork can be performed inside or outside of an edit session; however, geodatabase network datasets that are registered as versioned can only be built inside of an edit session. Also, shapefile network datasets can only be built outside of an edit session.
During the build process, the connectivity of features will be determined based on the connectivity policy and group settings and the elevation fields. The attributes defined on the network dataset will be populated within the logical network. Solve operations can still be performed on Network Datasets that have been edited since they have been built, however, the results are not guaranteed to be correct.
Note that all dirty areas are rebuilt, regardless of the envelope being passed in.
DeleteAttribute(INetworkAttribute)
Deletes the given attribute from the network dataset.
void DeleteAttribute(INetworkAttribute Attribute)
Parameters
AttributeINetworkAttribute
Remarks
DeleteAttribute removes the specified attribute from the network dataset. After calling DeleteAttribute, the network needs to be rebuilt.
DeleteSource(INetworkSource)
Deletes the given source from the network dataset.
void DeleteSource(INetworkSource Source)
Parameters
SourceINetworkSource
Remarks
DeleteSource removes the specified source from the network dataset. The source will be removed from all the network attributes and directions for the network dataset. DeleteSource cannot be performed on the system junction source for the network dataset. After calling DeleteSource, the network needs to be rebuilt.
UpdateSchema(IDENetworkDataset)
Updates the schema for the network dataset based upon the given data element.
void UpdateSchema(IDENetworkDataset DataElement)
Parameters
DataElementIDENetworkDataset
Remarks
The UpdateSchema method should be used to make multiple schema changes to a network dataset in one operation. Use the Delete and Add methods for Attributes and Sources in order to make simple schema edits.
Use IDatasetComponent::DataElement to retrieve a copy of the data element for this network dataset. Make the changes to the data element copy, then call UpdateSchema to update the network dataset. The end user is responsible for ensuring the integrity of the data element when it’s supplied to the UpdateSchema method.
Certain operations are not allowed and will return an error when performed with the UpdateSchema method, these include:
- Toggling turn support on the network dataset. Once created, turn support on a network dataset cannot be changed.
- Removing the system junction source on the network dataset