Kicking Ass with the Replace function in ArcMap Field Calculator

December 22, 2009

Time and time again, I find Field Calculator to be one of the most powerful tools available in ArcGIS Desktop and I use it almost every time I manipulate attribute data in ArcMap. “Replace” is one function that I find to be particularly useful and a major boost to my productivity!

You can use “Replace” to perform bulk replace operations for string fields. This can save you lot of typing!

In this example, I change the path for a set of orthophotos in an image catalog, from the C: drive to the D: drive.

To perform this operation;

  1. Open Field calculator by right clicking on the field where you want to change values
  2. use the following syntax in the Field Calculator dialog   

       replace ( [YOUR_FIELD_NAME] , “Old Value”, “New Value”)

          3. Click OK

The syntax for the example below would look like this:

    replace([IMAGE],”C:”,”D:”)

Field Calculator

 For more information on this topic, as well as other useful Field Calculator functions, see the following technical article from ESRI: HowTo: Use VBA functions in the field calculator 

Neocartography

March 28, 2009

Maps for Everybody!


Follow

Get every new post delivered to your Inbox.