<?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: arcpy on ArcDesktop 10.3 issue with assigning domains to fields in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651749#M50753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris Mowry,&lt;/P&gt;&lt;P&gt;See the below code &amp;amp; Image For one Feature class &amp;amp; subtypes AssignDomain to Field.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.AssignDomainToField_management("WS_Fitting","DIAMETER","CD_Diameter",["1: 11 Bend Fitting","2: 22 Bend Fitting"])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365008_AssignDomainToField.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 29 Jul 2017 12:33:25 GMT</pubDate>
    <dc:creator>pamarendra</dc:creator>
    <dc:date>2017-07-29T12:33:25Z</dc:date>
    <item>
      <title>arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651744#M50748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a python script I wrote that reuses domains. I had no issues with 10.2 but just upgraded to 10.3 and now the script throws an error (see below) if I assign the same domain to multiple fields in the same feature class. Any suggestions other than the obvious fix of creating a new domain for each field?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ExecuteError: ERROR 999999: Error executing function.&lt;/P&gt;&lt;P&gt;Item relationship between the items already exists.&lt;/P&gt;&lt;P&gt;The operation was attempted on an empty geometry.&lt;/P&gt;&lt;P&gt;Failed to execute (AssignDomainToField)."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jan 2015 00:47:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651744#M50748</guid>
      <dc:creator>ChrisMowry</dc:creator>
      <dc:date>2015-01-28T00:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651745#M50749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, this is not an answer, but a related problem. I can't do a "batch" of the function Assign Domain to Field for all the subtypes of my GDB. Same operation is working in ArcGIS 10.0, but not on the computer we just upgrade to 10,3. I obtain the same Error message. Any idea? Is 10,3 so different that I should update de GDB? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Feb 2015 19:00:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651745#M50749</guid>
      <dc:creator>MarianneCaouette1</dc:creator>
      <dc:date>2015-02-24T19:00:31Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651746#M50750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Francois,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how I got it to work. It seems to throw an error when it assigns the same domain to a different subtype, but does assign the domain to the field. So using the try/except, keeps the script running.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;subtypeVal = [1,2,3,4,5]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for value in subtypeVal:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AssignDomainToField_management(FeatureClass, Field, Domain, value )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Feb 2015 13:58:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651746#M50750</guid>
      <dc:creator>ChrisMowry</dc:creator>
      <dc:date>2015-02-25T13:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651747#M50751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem on a 10.3.1 environmemt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found out that your "try ... except" is not a good workaround because a sync-enable feature service published from "that" FeatureClass seems to give a corrupted SQLite goedatabase replica (Invalid XML if you catch the OpenAsync of a SQLite offline gdb via Runtime SDK).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone found the same connection from this error and the offline SQLite gdb InvalidXML error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone knows what "&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Item relationship between the items already exists"&lt;/SPAN&gt; exactly means?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 22:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651747#M50751</guid>
      <dc:creator>AlessandroRussodivito</dc:creator>
      <dc:date>2016-02-29T22:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651748#M50752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure if this is still valid, but I was having the same issue in 10.4.1. I found that I had to Assign the Domain to the field first, then I was able to add the Domain to the SubTypes (this seems to also go for when you need to delete a domain associated with SubTypes). So in you sample code you would need to add an initial AssignDomainToField just for the field. See second line below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;subtypeVal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;3&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;4&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AssignDomainToField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;FeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Domain&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; value &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; subtypeVal&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;AssignDomainToField_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;FeatureClass&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Field&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Domain&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; value &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;pass&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:38:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651748#M50752</guid>
      <dc:creator>JulianInskip</dc:creator>
      <dc:date>2021-12-12T03:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy on ArcDesktop 10.3 issue with assigning domains to fields</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651749#M50753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Chris Mowry,&lt;/P&gt;&lt;P&gt;See the below code &amp;amp; Image For one Feature class &amp;amp; subtypes AssignDomain to Field.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;arcpy.AssignDomainToField_management("WS_Fitting","DIAMETER","CD_Diameter",["1: 11 Bend Fitting","2: 22 Bend Fitting"])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/365008_AssignDomainToField.png" style="width: 620px; height: 348px;" /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Santhosh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Jul 2017 12:33:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-on-arcdesktop-10-3-issue-with-assigning/m-p/651749#M50753</guid>
      <dc:creator>pamarendra</dc:creator>
      <dc:date>2017-07-29T12:33:25Z</dc:date>
    </item>
  </channel>
</rss>

