NDC

Select by Location + Field Calculator

Discussion created by NDC on Sep 26, 2011
Latest reply on Sep 26, 2011 by NDC
Hello all.  I'm trying to improve on my automation skills but have hit a road block.  I'm trying to update features in a specific area and replace all SLOPE values of 999 with 0.

I am using model builder and can successfully run select by location to identify the drain features within the defined boundary polygon.  However, I am running into problems using Field Calculator to replace the attributes of those specific drains.

For VB I was using

replace([SLOPE]"999","0")

and I receive a VBA Error code saying "Expected ')'" End of statement as I understand?

I've also tried running it through a python script I had found and tried:

!SLOPE!.replace("999","0")
That is returning a syntax error.

I am new to running code and am just jumping in but this would help tremendously to other field classes where I have been stuck using Find&Replace.

Thank you

Outcomes