1

I am using Make Feature Layer as a tool in a model. You can see I have two instances of the tool. I'm having issues with the top one, Make Feature Layer (2).

ModelBuilder Diagram

I am using the tool's field renaming feature in order to avoid the complicated Add Field, Calculate Field, Delete Field process that is the other option for renaming. However, the tool is not seeing the correct field map from the input layer. It is unaware of the two required fields Shape_Length and Shape_Area. Therefore, when these two fields unexpectedly show up, the renaming is all offset by two fields. For instance, here is a table showing an example of my settings and desired result compared to my actual result.

example results table

Now to form this into some kind of question. Has anyone else experienced this? How can I get the tool to see the correct field map? Or is there another way around this?

  • If you are on 10.2 +, consider using the Alter Field GP tool instead if you can't get Make Feature Layer working. – Alex Tereshenkov Mar 2 '16 at 15:22
  • Unfortunately I'm on 10.1 – matthewiannowlin Mar 2 '16 at 15:23
  • Make Feature Layer cannot actually rename a field, it can only rename the alias. This approach just won't work in any version of ArcMap. Feature Class to Feature Class and Table to Table can actually rename fields when you output to a new feature class or table, and it is fast. However, if you do not create a new feature class only the Add Field, Calculate Field, Delete Field option is available at 10.1. You don't need the Make Feature Layer step and can directly use the FC to FC tool in your model to do the field renaming. – Richard Fairhurst Mar 2 '16 at 15:33
  • Wow I never saw that I can rename fields if I right-click field names in Feature Class to Feature Class' field map. I'm going to try this to see if it works. If it does, can you post the comment as an answer so I can mark it? – matthewiannowlin Mar 2 '16 at 15:39
  • Feature Class to Feature Class is still seeing what looks like an outdated version of the field map. In the actual field map, some fields are slightly out of order. I will go ahead with the tool and see what happens when I rename the fields. – matthewiannowlin Mar 2 '16 at 15:45
1

Make Feature Layer cannot actually rename a field, it can only rename the alias (although even that fails if the tool generates a layer directly in ArcMap outside of a model). This approach just won't work in any version of ArcMap.

Feature Class to Feature Class and Table to Table can actually rename fields when you output to a new feature class or table, and it is fast. Additionally, you can convert field types, modify Text field lengths, etc. with these two tools when you create a new FC/table as long as all of the data contained in the field is fully compatible with the field modification. Unfortunately, these tools cannot be used to change the field order of the original FC/table in the output.

However, if you do not create a new feature class/table only the Add Field, Calculate Field, Delete Field option is available at 10.1. The Alter Field GP tool is only available at 10.2+.

You don't need the Make Feature Layer step and can directly use the FC to FC tool in your model to do the field renaming.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.