This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Location > ESRI.ArcGIS.Location > Interfaces > IL > ILocatorAttach Interface > ILocatorAttach.AttachLocator Method (ArcObjects .NET 10.5 SDK) |
Attaches a locator to a table.
[Visual Basic .NET] Public Sub AttachLocator ( _ ByVal Locator As ILocator, _ ByVal attachToTable As ITable, _ ByVal InputTable As ITable, _ ByVal inputFieldNames As String, _ ByVal InputJoinFieldName As String, _ ByVal OutputTable As ITable, _ ByVal outputFieldNames As String, _ ByVal OutputJoinFieldName As String _ )
[C#] public void AttachLocator ( ILocator Locator, ITable attachToTable, ITable InputTable, string inputFieldNames, string InputJoinFieldName, ITable OutputTable, string outputFieldNames, string OutputJoinFieldName );
[C++]
HRESULT AttachLocator(
ILocator* Locator,
ITable* attachToTable,
ITable* InputTable,
BSTR inputFieldNames,
BSTR InputJoinFieldName,
ITable* OutputTable,
BSTR outputFieldNames,
BSTR OutputJoinFieldName
);
[C++]
Parameters Locator [in]
Locator is a parameter of type ILocator attachToTable [in]
attachToTable is a parameter of type ITable InputTable [in]
InputTable is a parameter of type ITable inputFieldNames [in] inputFieldNames is a parameter of type BSTR InputJoinFieldName [in] InputJoinFieldName is a parameter of type BSTR OutputTable [in]
OutputTable is a parameter of type ITable outputFieldNames [in] outputFieldNames is a parameter of type BSTR OutputJoinFieldName [in] OutputJoinFieldName is a parameter of type BSTR
The AttachLocator method attaches a locator to a dataset. After creating a dataset using a locator, you should attach the locator to the dataset so that it can be rematched.
The Locator parameter specifies the locator that you want to attach to the dataset. Usually, this is the locator that you used to create the dataset.
The attachToTable parameter specifies the dataset to which you want to attach the locator.
The InputTable parameter specifies the dataset that contains the input attributes required by the locator. When you locate a table, you should copy the input attributes to the output dataset, and this property should then refer to the located dataset.
The InputFieldNames parameter is a comma-delimited string that specifies the names of the fields in InputTable that contain the input attributes required by the locator.
Use the InputJoinFieldName parameter to specify the attribute in InputTable that relates records in the input table to records in the located dataset. Normally, you will use the name of the ObjectID attribute in the located dataset for this parameter.
The OutputFieldNames parameter is a comma-delimited string that specifies the names of the fields in the located dataset that contain the match attributes generated by the locator. If the locator supports the IAddressGeocoding interface, you can use the MatchFields property to determine which fields contain the match attributes.
Use the OutputJoinFieldName parameter to specify the attribute in the located dataset that relates records in the located dataset to records in InputTable. Normally, you will use the name of the ObjectID attribute in the located dataset for this parameter.
The OutputTable parameter specifies the dataset that contains the result fields created by the address locator. Typically, this is the geocoded feature class, and is the dataset to which you are attaching the locator.