ArcObjects Library Reference (Location)  

ILocatorAttach2.AttachLocator Method

Attaches a locator to a table (simple function).

[Visual Basic .NET]
Public Sub AttachLocator ( _
    ByVal Locator As ILocator, _
    ByVal attachToTable As ITable, _
    ByVal inputFieldNames As String, _
    ByVal outputFieldNames As String _
)
[C#]
public void AttachLocator (
    ILocator Locator,
    ITable attachToTable,
    string inputFieldNames,
    string outputFieldNames
);
[C++]
HRESULT AttachLocator(
  ILocator* Locator,
  ITable* attachToTable,
  BSTR inputFieldNames,
  BSTR outputFieldNames
);
[C++]

Parameters

Locator [in]

  Locator is a parameter of type ILocator

attachToTable [in]

  attachToTable is a parameter of type ITable

inputFieldNames [in]   inputFieldNames is a parameter of type BSTR outputFieldNames [in]   outputFieldNames is a parameter of type BSTR

Product Availability

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

Remarks

The AttachLocator method attaches a copy of a locator to a dataset. This is generally done after geocoding a table of addresses to a feature class. A copy of the locator that was used to geocode the table of addresses is then attached to the geocoded feature class so that the geocoded feature class can be rematched at a later time.

The Locator parameter is the locator of which a copy will be attached to the dataset specified by the attachToTable parameter. Generally, the attachToTable parameter is a reference to a geocoded feature class, and the Locator parameter is a reference to the locator that was used to create it.

The InputFieldNames parameter is a comma-delimited list of the fields in the dataset represented by the attachToTable parameter that map to the input fields used by the locator. The OutputFieldNames parameter is a comma-delimited list of the fields in the dataset represented by the attachToTable parameter that contain the match attributes generated by the locator. Use the IAddressGeocoding::MatchFields property to determine which match attributes the locator generates.

To retrieve an attached locator from a dataset, use the ILocatorManager::GetLocatorFromDataset method.

See Also

ILocatorAttach2 Interface | ILocatorAttach2.AttachLocator Method | AttachedLocator Class | ILocatorAttach2 Interface | IAttachedLocator Interface | IAddressGeocoding.MatchTable Method | ILocatorManager.HasLocatorAttached Method | ILocatorManager.GetLocatorFromDataset Method | ILocatorAttach2.AttachLocator Method | ILocatorAttach2 Interface