I have updated the Batch Edit String Fields toolbox that I blogged about in a previous entry. I have replaced the script formerly called Replace with a script called Find and Replace. This new Find and Replace script searches a field in an attribute table for user defined characters entered in the script GUI, and replaces them with characters, also entered in the script GUI. The script can be drug into Model Builder and be run as a geoprocessing tool.
![]() |
The new script has been added to the Batch Edit String Fields toolbox (see Batch Edit String Fields - Free Tools for Calculating String Fields for more information on the scripts in this toolbox). You can download the toolbox from the geospatial database. Right click the link and select Save Target As... Unzip the folder and be sure to store the toolbox in the same location as all of the Python scripts – relative paths are used to locate the scripts.
Batch Edit String Fields

Nice!
ReplyDeleteIvar
Brooke,
ReplyDeleteYour a rock star! Now how do I go about using something like this to do multiple Find/Replaces?
I have 35 string values that I need to F/R individually. All of them are located in the same column. In theory I should be able to do this without having to do a long If statement, correct?
Any help would be create.
Haskett
Haskett,
ReplyDeleteThanks for your question and for reading my blog. So you have 35 different values that you need to run the Find and Replace on within a single column. One thing you could do is right click the Find and Replace tool in ArcToolbox, and select Batch... This allows you to pre-populate the arguments for running the tool multiple times (in your case 35). This will still be time consuming to do for 35 different F/R, but any method for that many different F/R will take some time.
Good luck with it. Let me know if you have any other questions.
Thanks again!
Brooke