<?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: Change domains for subtype features in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/1208756#M65453</link>
    <description>&lt;P&gt;This should be marked as the solution.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 01 Sep 2022 15:57:44 GMT</pubDate>
    <dc:creator>MaximeDemers</dc:creator>
    <dc:date>2022-09-01T15:57:44Z</dc:date>
    <item>
      <title>Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15878#M1234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to change the domains on a feature class that has sybtypes with arcpy?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/403164_pastedImage_3.png" style="width: auto; height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 17:20:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15878#M1234</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2018-04-26T17:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15879#M1235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out:&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/an-overview-of-the-domains-toolset.htm"&gt;An overview of the Domains toolset&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/an-overview-of-the-subtypes-toolset.htm"&gt;An overview of the Subtypes toolset&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You should be able to use these tools to do what you need.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:04:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15879#M1235</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-04-26T18:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15880#M1236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't see anything in them that will let me set the domain on a field by subtype... unless I am missing something...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2018 18:46:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15880#M1236</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2018-04-26T18:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15881#M1237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are using Pro, there's this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/help/data/geodatabases/overview/create-modify-and-delete-subtypes.htm"&gt;Create, modify, and delete subtypes&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With Desktop, I believe it is a Delete and Add instead of Modify.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:05:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15881#M1237</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2018-04-27T19:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15882#M1238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No we are still on desktop. But I did judge your last post to fast. It is part of the solution I think for sure. I was just being foolish. I am testing now...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2018 19:15:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15882#M1238</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2018-04-27T19:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15883#M1239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My solution:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/arcpy/data-access/listsubtypes.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/data-access/listsubtypes.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;ListSubtypes—Data Access module | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/assign-domain-to-field.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/assign-domain-to-field.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Assign Domain To Field—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #a9b7c6;"&gt;&lt;SPAN style="color: #cc7832;"&gt;import &lt;/SPAN&gt;arcpy

sde_path = &lt;SPAN style="color: #a5c261;"&gt;r"xxxx&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"
&lt;/SPAN&gt;arcpy.env.workspace = sde_path
domain = &lt;SPAN style="color: #a5c261;"&gt;"T_LineSegment"
&lt;/SPAN&gt;domain_feature_classes = {&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"feature_class": "domain_field", ....&lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;}
&lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;
&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;feature&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;domain_field &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;domain_feature_classes.items():
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;print &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"updating domains by subtype on " &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;+ feature
&amp;nbsp;&amp;nbsp;&amp;nbsp; subtypes = arcpy.da.ListSubtypes(feature)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;for &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;k&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;v &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;in &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;subtypes.items():
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;print &lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;"&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;\t&lt;/SPAN&gt;&lt;SPAN style="color: #a5c261;"&gt;setting domain for subtype code: " &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;+ &lt;/SPAN&gt;&lt;SPAN style="color: #8888c6;"&gt;str&lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;(k)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.AssignDomainToField_management(feature&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;domain_field&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;domain&lt;/SPAN&gt;&lt;SPAN style="color: #cc7832;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="color: #a9b7c6;"&gt;k)

&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:38:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/15883#M1239</guid>
      <dc:creator>forestknutsen1</dc:creator>
      <dc:date>2021-12-10T20:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Change domains for subtype features</title>
      <link>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/1208756#M65453</link>
      <description>&lt;P&gt;This should be marked as the solution.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Sep 2022 15:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/change-domains-for-subtype-features/m-p/1208756#M65453</guid>
      <dc:creator>MaximeDemers</dc:creator>
      <dc:date>2022-09-01T15:57:44Z</dc:date>
    </item>
  </channel>
</rss>

