AnsweredAssumed Answered

Is Modelbuilder the *only* way to rename fields - not succeeding in Python

Question asked by harrybowman on Nov 1, 2012
Latest reply on Aug 28, 2013 by johnnhansen
Probably doing it incorrectly, but following the samples in which I try Python:

import arcpy fi = arcpy.FieldInfo() fi.addField("Name", "Name2", "VISIBLE", "") arcpy.MakeFeatureLayer_management("TheFC, "foo5", "","", fi) arcpy.CopyFeatures_management("foo5", "hoo1")


Does NOT persist renaming the fields. Hoo1 still has the old names. According to what I have read, it shouldn't. Is modelbuilder the *only* way renaming works? Is it possible by using ArcPy field methods? What am I doing incorrectly (this time)?

Outcomes