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:
1. 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)
2. Clip a parcel layer by each group
3. Populate a new field in the parcel layer called "EsmtType" with the name of each group (group is called "Value" in model)
4. 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 this post Using a value from "iterate feature selection' to calculate a field but I couldn't figure out how to implement it for my situation.
You need to reference Value in the field calculator expression using percentage signs so the Expression would be '%Value%' if you are calculating into a text field.
To merge the clipped outputs you will need to use the Collect Values tool to collect the outputs of clip, make that output a parameter and drag that into a different model, the output of Collect Values would then be an input to the Merge Tool.