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


INetworkBuild.AddSource Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geodatabase > ESRI.ArcGIS.GeoDatabase > Interfaces > IN > INetworkBuild Interface > INetworkBuild.AddSource Method
ArcGIS Developer Help

INetworkBuild.AddSource Method

Adds the given source to the schema of the network dataset.

[Visual Basic .NET]
Public Sub AddSource ( _
    ByVal Source As INetworkSource _
)
[C#]
public void AddSource (
    INetworkSource Source
);
[C++]
HRESULT AddSource(
  INetworkSource* Source
);
[C++]
Parameters
Source [in]

Source is a parameter of type INetworkSource*

Product Availability

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

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.

See Also

INetworkBuild Interface