This document is archived and information here might be outdated. Recommended version. |
Populate the network analysis class.
[Visual Basic .NET] Public Sub Load ( _ ByVal cursor As ICursor, _ ByVal TrackCancel As ITrackCancel, _ ByRef rowsInCursor As Integer, _ ByRef rowsLocated As Integer _ )
[C#] public void Load ( ICursor cursor, ITrackCancel TrackCancel, ref int rowsInCursor, ref int rowsLocated );
[C++]
HRESULT Load(
ICursor* cursor,
ITrackCancel* TrackCancel,
System.Int32* rowsInCursor,
System.Int32* rowsLocated
);
[C++] Parameters cursor [in]
cursor is a parameter of type ICursor* TrackCancel [in]
TrackCancel is a parameter of type ITrackCancel* rowsInCursor [in, out]
rowsInCursor is a parameter of type long* rowsLocated [in, out]
rowsLocated is a parameter of type long*
Load iterates through the input cursor and populates the NAClass with NALocationFeatures with field values based on the FieldMap and Locator. It returns as output parameters the number of features in the cursor and the number of network locations that could be located.
If you know the number of rows in the input cursor and are passing a TrackCancel object that has a reference to an object that implements IStepProgressor, you should set the rowsInCursor parameter to the number of rows in the cursor. This will allow for feedback showing how many rows have been loaded out of the total number to load. For example it might say "Loading into "Stops" (120 of 230)". If you do not know how many rows are in the cursor, you should initialize the rowsInCursor variable to 0 prior to calling Load.
This method will return the error E_ABORT if the ITrackCancel object passed in to Load causes the load to cancel.