FAQ: Is it possible to rename output feature layers in batches to match the names of input layers during analysis?
Is it possible to rename output feature layers in batches to match the names of input layers during analysis?
Yes, it is possible to rename the output layers in batches to match the names of input layers. The most efficient method is the inline variable substitution technique through Model Builder by iterating items to apply the input file name as the output feature class name.
For example, the Raster to Polygon tool is capable of converting rasters to polygons in a batch, but is unable to rename the output polygon features in batches as the raster names cannot be recognized. In this case, each output needs to be renamed manually, which can be time consuming when it involves large volumes.
To rename the output feature layers in batches to match the input feature layer names, do the following:
- In ArcMap, navigate to Geoprocessing, and click ModelBuilder.
- Setup the workspace by adding the relevant datasets.
- Connect the dataset to the Iterate function added to the model. In this example, the Iterate Rasters function is used.
- Add and connect any desired tool to the model. This can be done by dragging and dropping the relevant tool from ArcMap into the ModelBuilder workspace.
- Right-click the output model and use the inline variable substitution technique as described in ArcGIS Help: Examples of inline model variable substitution.
- Define the remaining settings as needed.
- Click OK and run the model.
- ArcGIS Help: A quick tour of using inline variable substitution
- ArcGIS Help: What is ModelBuilder
- ArcGIS Help: Running a model from within ModelBuilder