2

I have a file gdb containing feature classes and address locators. I am listing and storing the names of the datasets using

arcpy.env.workspace = "C:\input.gdb"
(root, fds, ftrs) = arcpy.da.Walk().next()

The feature class names appear in ftrs as expected, but the locators do not. By filtering on FeatureClass

(root, fds, ftrs) = arcpy.da.Walk(datatype='FeatureClass').next()

the feature class names are populated once again, as expected. Filtering on datatype=Locator returns an empty list. I set the filter to Table as a check, and the list returned empty as expected.

I would like to know why the address locators in the file gdb are not being listed when arcpy.da.Walk is used to specifically filter out Locator?

  • What version of ArcGIS do you use? – GISGe Apr 22 '15 at 10:19
  • If you use the datatype 'Any' does it include the locators? – landocalrissian Apr 22 '15 at 12:04
  • @GISGe I'm on 10.3. I remember trying this in 10.2 as well, and it didn't work then either. – Cindy Jayakumar Apr 22 '15 at 12:29
  • @ChrisR I assumed not adding any parameters would return everything by default. Either way, using the Any still only returned the feature classes, and not the locators. – Cindy Jayakumar Apr 22 '15 at 12:32
  • Strange, it don't have any issue with 10.3 (when printing the name of the locators returned by da.walk). And what is the version of your gdb? – GISGe Apr 22 '15 at 12:36
0

arcpy.da.walk was introduced in version 10.1 SP1, that must be why it didn't work with your 10.1 geodatabase.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.