Provides access to members for changing the schema of a network dataset and building it.
Members
Name | Description | |
---|---|---|
AddAttribute | Adds the given attribute to the schema of the network dataset. | |
AddSource | Adds the given source to the schema of the network dataset. | |
BuildNetwork | Builds the network dataset for the given extent. | |
DeleteAttribute | Deletes the given attribute from the network dataset. | |
DeleteSource | Deletes the given source from the network dataset. | |
UpdateSchema | Updates the schema for the network dataset based upon the given data element. |
INetworkBuild.AddAttribute Method
Adds the given attribute to the schema of the network dataset.
Public Sub AddAttribute ( _
ByVal Attribute As INetworkAttribute _
)
public void AddAttribute (
INetworkAttribute Attribute
);
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.
INetworkBuild.AddSource Method
Adds the given source to the schema of the network dataset.
Public Sub AddSource ( _
ByVal Source As INetworkSource _
)
public void AddSource (
INetworkSource Source
);
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.
INetworkBuild.BuildNetwork Method
Builds the network dataset for the given extent.
Public Function BuildNetwork ( _
ByVal areaToBuild As IEnvelope _
) As IEnvelope
public IEnvelope BuildNetwork (
IEnvelope areaToBuild
);
Description
BuildNetwork builds the network dataset in the area specified by the areaToValidate envelope and returns the envelope of the validated area. If an empty envelope is supplied, BuildNetwork will return an empty validated area. The simplest way to build a Network Dataset is to pass in the envelope of the extent of the network dataset. Note that the network dataset must be rebuilt when edits are made to the underlying features or feature classes. Edits include:
- Add, delete, modify features
- Schema changes to feature classes
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.
INetworkBuild.DeleteAttribute Method
Deletes the given attribute from the network dataset.
Public Sub DeleteAttribute ( _
ByVal Attribute As INetworkAttribute _
)
public void DeleteAttribute (
INetworkAttribute Attribute
);
Remarks
DeleteAttribute removes the specified attribute from the network dataset. After calling DeleteAttribute, the network needs to be rebuilt.
INetworkBuild.DeleteSource Method
Deletes the given source from the network dataset.
Public Sub DeleteSource ( _
ByVal Source As INetworkSource _
)
public void DeleteSource (
INetworkSource Source
);
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.
INetworkBuild.UpdateSchema Method
Updates the schema for the network dataset based upon the given data element.
Public Sub UpdateSchema ( _
ByVal DataElement As IDENetworkDataset _
)
public void UpdateSchema (
IDENetworkDataset DataElement
);
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
Classes that implement INetworkBuild
Classes | Description |
---|
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.