In this topic
Determining when to rebuild address locators
Rebuild an address locator only if the reference data has been updated and the changes need to be added to the current address locator. See the following:
- Create a locator if you update a locator style. Rebuilding will not update the style associated with the current locator.
- Republish the locator after it is rebuilt, if you have a locator published to ArcGIS Server.
Rebuilding an address locator
See the following code example to rebuild an address locator:
[C#]
public void RebuildAddressLocatorPersonalGeodataase()
{
Geoprocessor GP = new Geoprocessor();
RebuildAddressLocator rebuild = new RebuildAddressLocator();
// Quotes are needed around the path to the address locator when it contains spaces.
rebuild.in_address_locator = @"D:\Workspace\Madison\Madison.mdb\Madison Streets";
GP.Execute(rebuild, null);
}
[VB.NET]
Public Sub RebuildAddressLocatorPersonalGeodataase()
Dim GP As Geoprocessor = New Geoprocessor()
Dim rebuild As RebuildAddressLocator = New RebuildAddressLocator()
' Quotes are needed around the path to the address locator when it contains spaces.
rebuild.in_address_locator = "D:\Workspace\Madison\Madison.mdb\Madison Streets"
GP.Execute(rebuild, Nothing)
End Sub
To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
Development licensing | Deployment licensing |
---|---|
Engine Developer Kit | Engine Runtime |
ArcView | ArcView |
ArcEditor | ArcEditor |
ArcInfo | ArcInfo |