I am using ArcMap 10.1.
I have two polygon feature classes, an alignment layer and a parcels layer. I am trying to use ModelBuilder to create a tool that will do the follow:
- iterate through groups in a single field of a polygon alignment layer (ie select and iterate through certain attributes in a field with same names such as "tunnel", "portal", etc)
- Clip a parcel layer by each group
- Populate a new field in the parcel layer called "EsmtType" with the name of each group (group is called "Value" in model)
- Merge the clipped groups into one feature class
I have gotten steps 1 and 2 to function but I am stuck on step 3. I am not sure how I need to configure the "Calculate Field" tool in order to recognize the "Value" variant of the "Iterate Feature Selection" tool. I tried using the advice from Using a value from "iterate feature selection' to calculate a field but I couldn't figure out how to implement it for my situation.
Here is the model I have thus far:
http://imgur.com/ji2nAJJ
I would also like advice on how to implement step 4, I am not sure if it would require integrating a model within a model.
Best Answer
I remember struggling with this in ModelBuilder as well, and the method I eventually came up with is this:
An expression is built using the
Calculate Value
tool withValue
as an inline variable. It will return a string containing the currentValue
which can be used as the expression for theCalculate Field
tool.