<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: List feature class alias...is this even possible? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579295#M45436</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While you wait for 10.1 if you still wanted to do this you could try a script similar to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import acrpy
arcpy.env.workspace = 'C:\\ENTER_YOUR_FILE_NAME_HERE'
#create variables for your two comparisons
feature_class = 'YOUR_FEATURE_CLASS_NAME'
table = 'YOUR_EXCEL_TABLE'

urows = arcpy.UpdateCursor(feature_class)
srows = arcpy.SearchCursor(table)

for srow in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; table_alias = srow.COLUMN_NAME
&amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature_alias = urow.COLUMN_NAME
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if feature alias != table_alias:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table_alias = feature_alias
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.UpdateRow(urow)

del srow, srows, urow, urows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I apologize for any wrong code, but I have only been coding for three months. I just wanted to try my hand and see if I could answer a question on here. It should work with a little bit of tweeking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bryce&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:55:08 GMT</pubDate>
    <dc:creator>BryceGardner1</dc:creator>
    <dc:date>2021-12-12T00:55:08Z</dc:date>
    <item>
      <title>List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579292#M45433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is it possible to print a list of feature classes with their corresponding alias via Python?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If the aforementioned is possible, here???s another question???&amp;nbsp; My team is responsible for 400+ feature classes, some of which change on a frequent basis.&amp;nbsp; We have an Excel spreadsheet that lists the feature class (column 1) and the corresponding alias that we assign (column 2).&amp;nbsp; Could a Python script look at each feature class and ask the following questions for each one: ???Does the current feature class alias match the alias in the Excel spreadsheet (column 2)?&amp;nbsp; If yes, do nothing.&amp;nbsp; If no, change the alias to the one in the Excel spreadsheet (column 2).???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently we are opening the properties in ArcCatalog one-by-one to check the alias and/or hand jamming a new/replacement alias....&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance!&amp;nbsp; We currently use ArcMap version 10 with a future upgrade to version 10.1&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 18:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579292#M45433</guid>
      <dc:creator>LinaDailide-Custodio</dc:creator>
      <dc:date>2013-11-20T18:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579293#M45434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can access the aliasName property through &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//018v00000052000000"&gt;Describe&lt;/A&gt;&lt;SPAN&gt;. Without getting into ArcObjects I don't think you will be able to write to the aliasName property.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can test to see if the alias matches the one in your record and flag that for modification, but automatically changing it would be more difficult.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Edit: My mistake. It seems there is a tool for that in 10.1. I don't think it is available in 10.0, however.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//018v0000008v000000"&gt;AlterAliasName&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Nov 2013 19:33:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579293#M45434</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-11-20T19:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579294#M45435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Right, AlterAliasName is &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/45982-Renaming-alias"&gt;new at 10.1&lt;/A&gt;&lt;SPAN&gt; but is the right way of doing this for 10.1+.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Nov 2013 18:46:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579294#M45435</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2013-11-21T18:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579295#M45436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;While you wait for 10.1 if you still wanted to do this you could try a script similar to this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import acrpy
arcpy.env.workspace = 'C:\\ENTER_YOUR_FILE_NAME_HERE'
#create variables for your two comparisons
feature_class = 'YOUR_FEATURE_CLASS_NAME'
table = 'YOUR_EXCEL_TABLE'

urows = arcpy.UpdateCursor(feature_class)
srows = arcpy.SearchCursor(table)

for srow in srows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; table_alias = srow.COLUMN_NAME
&amp;nbsp;&amp;nbsp;&amp;nbsp; for urow in urows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; feature_alias = urow.COLUMN_NAME
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if feature alias != table_alias:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; table_alias = feature_alias
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; urows.UpdateRow(urow)

del srow, srows, urow, urows&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I apologize for any wrong code, but I have only been coding for three months. I just wanted to try my hand and see if I could answer a question on here. It should work with a little bit of tweeking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bryce&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:55:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579295#M45436</guid>
      <dc:creator>BryceGardner1</dc:creator>
      <dc:date>2021-12-12T00:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579296#M45437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Although someone did say that this task should be possible in v10.1, I would recommend going from v10.0 to v10.2 so you have less upgrades to perform.&amp;nbsp; My organization should be finished with this specific upgrade in a few weeks, but I did hear that sp1 for v10.2 should be out by the end of the year which should address some of the bugs that currently exist in v10.2.&amp;nbsp; From my experience, v10.2 is a glorified service pack to v10.1.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Nov 2013 14:46:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579296#M45437</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2013-11-22T14:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: List feature class alias...is this even possible?</title>
      <link>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579297#M45438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Appreciate all the responses�?�&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Tried using aliasName and it works for version 10, so that�??s great news!&amp;nbsp; (Also, thank you for pointing out that a feature class alias is the same thing as a table alias.)&amp;nbsp; Now the trick is to modify &lt;/SPAN&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/GDB_Table_properties/018v00000052000000/"&gt;this simple script &lt;/A&gt;&lt;SPAN&gt;and have it run through an entire gdb while also listing the corresponding feature class�?�.&amp;nbsp; Then I can write a script where I can manually change feature class names, current alias and proposed alias in the code and run the script when changes are necessary.&amp;nbsp; This is an excellent start!&amp;nbsp; Many thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Nov 2013 12:57:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/list-feature-class-alias-is-this-even-possible/m-p/579297#M45438</guid>
      <dc:creator>LinaDailide-Custodio</dc:creator>
      <dc:date>2013-11-26T12:57:01Z</dc:date>
    </item>
  </channel>
</rss>

