I'm developing a GIS script for my office that will take a ".csv" table containing addresses and generating a heat map from it. I'm able to get the code running when I "hard code" the values, but what I want to do is turn the script into an ArcGIS tool which would take user input. The script has a geocoding component, and this is where I feel stuck. I can't figure how to modify the tool parameter in ArcGIS so the user can which fields from the input table contains the address (street name, city etc), similarly to the actual Geocoding tool. Is there a way to do this or do I have to drop the geocoding component from the script ?
Hope this make sense.
Thanks,
Anis
You can do this by using isAltered() on the parameter (the one assigned for csv input) in the tool validation class. If it’s altered (csv loaded) then get the header of the csv and set the next parameter using the filter, to be the value table (multi-input) or list for the user to select from. Then you’ll have to take those selections, parse them, and map to your geocoder. I can post an example in a few hours.
Sorry for taking that long to respond. I kind of gave up on this and forgot to check any new answers. I will definitely try that method and let you know if that worked.