Set Locator properties as part of python script

2665
5
03-25-2020 08:43 AM
JoshKalov
New Contributor III

Hello,

I am writing a python script to create a 2.5 locator using the Create Locator arcpy function. As part of this process I would like to be able to set the locator properties (especially "Geocoding options") through the script. These are the ones that are available when you right click on a locator in ArcPro. Is there a way to access these properties using ArcPy or ArcGIS Python api? I could probably have the script edit the .loc file directly but I was hoping there was a more "official" way.

Thanks

Josh

0 Kudos
5 Replies
ShanaBritt
Esri Regular Contributor

Josh:

Currently there is no way to adjust any of the locator properties that you see in the Locator Properties dialog in ArcGIS Pro via Python. However, we are looking into adding support for modifying properties via Python for an upcoming release. It is possible to modify that properties manually in the *.loc file of the locator, but it is discouraged and not supported.

0 Kudos
ShanaBritt
Esri Regular Contributor

If you are part of the beta program you can test out pro 2.6 beta as we've added a Geocoding module to ArcPy that allows you set locator properties and geocode using Python.

0 Kudos
JoshKalov
New Contributor III

Thanks. How does someone become part of the beta program?

0 Kudos
ShanaBritt
Esri Regular Contributor

Here is a link to the program. Early Adopter Community | Esri Early Adopter Program 

0 Kudos
ShanaBritt
Esri Regular Contributor

ArcGIS Pro 2.6 is now available and includes the new ArcPy Geocoding module that will allow you to perform geocoding operations via Python and modify locator properties. A list of the properties that can be modified are listed here, https://pro.arcgis.com/en/pro-app/arcpy/geocoding/locator-class.htm#P_GUID-B617A31C-2B5E-427F-BBEB-B... .

0 Kudos