Select to view content in your preferred language

how to change the alias of a Feature Class and/or Attribute from python?

3074
3
07-15-2010 11:13 AM
mattwilkie
Deactivated User
subject line says it all really, but I can add the use case:  I have over a hundred FCs, each with 10 or 20 attributes to add or change the aliases to, two or more times a year. Needless to say, this is not something I'm going to grunt my way through. How can I automate this process?

I have access to Arcgis 9.3.1 and 10.

thank you,
0 Kudos
3 Replies
mattwilkie
Deactivated User
The only thing I've found to date for changing the alias is via  ArcObjects AlterAliasName method; some related discussion here and here using VB/VBA.


  Mark Cederholm has a presentation on accessing  arcobjects from python. It requires Visual Studio's cl.exe  (Express probably ok, not sure what minimum version) and the Windows SDK's midle.exe in addition to  arcgis and python.


Further follow up on this thread will be here
0 Kudos
MatthewStarry
Occasional Contributor
Any update on this?  That link to StackOverflow is dead.  I would like to change the aliases for hundreds of fields preferably using Python.
0 Kudos
mattwilkie
Deactivated User
yes I did get a working solution using Mark Cederholm's work, see http://gis.stackexchange.com/questions/255/arcgis-change-feature-class-and-field-aliases-in-bulk.

I now think it might be possible to do it more simply without Cederholm's method, but have yet to try it, see http://gis.stackexchange.com/questions/80/how-do-i-access-arcobjects-from-python/4982#4982. If/when I ever do the result will be hosted at https://bitbucket.org/maphew/canvec (the existing solution is there already).
0 Kudos