Select to view content in your preferred language

Model Builder to calculate multiple shape files

1007
2
Jump to solution
09-11-2012 11:20 AM
RyanMiller
Deactivated User
I have multiple shape files that all contain a field named "Area." Currently, I am forced to calculate the area field in each individual shape file which is very time consuming. Is anyone aware of a way to batch calculate something like this?  Would the use of an iterator be the way to go?  I was thinking of trying to build a model in to do this but I wasn't sure if it was even possible.

Any thoughts? I don't have a ton of experience with Model Builder, and really zero experience with iterators in Model Builder. 

As always, thank in advance!

Ryan
0 Kudos
1 Solution

Accepted Solutions
JonathanQuinn
Esri Notable Contributor
Well, you could right click on Calculate Field and go to Batch, which will allow you to enter mulitple inputs, choose the field you'd like to calculate, and then run the tool.  You can use the "Fill" option to populate both the Field Name field and the Expression field within the tool.

[ATTACH=CONFIG]17610[/ATTACH]

Alternatively, use the Feature Class iterator to iterate through your shapefiles in a workspace and then use the Calculate Field tool on the output.

[ATTACH=CONFIG]17611[/ATTACH]

View solution in original post

0 Kudos
2 Replies
JonathanQuinn
Esri Notable Contributor
Well, you could right click on Calculate Field and go to Batch, which will allow you to enter mulitple inputs, choose the field you'd like to calculate, and then run the tool.  You can use the "Fill" option to populate both the Field Name field and the Expression field within the tool.

[ATTACH=CONFIG]17610[/ATTACH]

Alternatively, use the Feature Class iterator to iterate through your shapefiles in a workspace and then use the Calculate Field tool on the output.

[ATTACH=CONFIG]17611[/ATTACH]
0 Kudos
RyanMiller
Deactivated User
Thanks Jonathan!
0 Kudos