I am using ArcGIS 10.1 for Desktop.
My goal is to create shapefile that contains merged feature classes from a geodatabase. I would like for there to be a new field in the resulting shapefile that contains the name of the original feature class. The tool that I have created is successful in merging the FCs into one shapefile however the "Name" field is blank for ever record.
The field that is intended to be populated is set up as a text field (length 50). I have set the "Name" variable from Iterate Feature Classes as a precondition to calculate field. My expression in Calculate field is "%Name%" with Expression Type Python.
What do I need to change to make this work?
Link to Image : http://imgur.com/R0h4U78
Answer
I followed the suggestion provided by @PolyGeo and I used the "NAME" component of Parse Path to populate Calculate Field. I connected the "Value" variable from Parse Path as a pre-condition to Calculate value. This solution was successful. This is what my final model looks like:
No comments:
Post a Comment