<?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>idea Identify features referenced by domain in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/identify-features-referenced-by-domain/idi-p/940157</link>
    <description>&lt;P&gt;Need to add a tool in ArcToolbox to identify features that use a particular domain.&lt;BR /&gt;&lt;BR /&gt;This is tool would compliment the existing tools: Delete Domain and Remove Domain From Field since this information is required to use these tools.&lt;BR /&gt;&lt;BR /&gt;I was provided with a Python script to accomplish this task:&lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;import string&lt;BR /&gt;from arcpy import env&amp;nbsp;&lt;BR /&gt;import os&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;#Set workspace environment to geodatabase&lt;BR /&gt;arcpy.env.workspace = r"Database Connections\Connecting to database.sde"&lt;BR /&gt;&lt;BR /&gt;#Get list of feature classes in geodatabase&lt;BR /&gt;FCs = arcpy.ListFeatureClasses()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#Loop through feature classes in list&lt;BR /&gt;for FC in FCs:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #List fields in feature class&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fields = arcpy.ListFields(FC)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #Loop through fields&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for field in fields:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Check if field has domain&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if field.domain != "":&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Print feature class, field, domain name&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print FC, field.name, field.domain&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;!--  content transformation source ID: 087E0000000CyIo  --&gt;</description>
    <pubDate>Tue, 23 Jul 2024 18:38:19 GMT</pubDate>
    <dc:creator>BrianPangtay</dc:creator>
    <dc:date>2024-07-23T18:38:19Z</dc:date>
    <item>
      <title>Identify features referenced by domain</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/identify-features-referenced-by-domain/idi-p/940157</link>
      <description>&lt;P&gt;Need to add a tool in ArcToolbox to identify features that use a particular domain.&lt;BR /&gt;&lt;BR /&gt;This is tool would compliment the existing tools: Delete Domain and Remove Domain From Field since this information is required to use these tools.&lt;BR /&gt;&lt;BR /&gt;I was provided with a Python script to accomplish this task:&lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;import string&lt;BR /&gt;from arcpy import env&amp;nbsp;&lt;BR /&gt;import os&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;#Set workspace environment to geodatabase&lt;BR /&gt;arcpy.env.workspace = r"Database Connections\Connecting to database.sde"&lt;BR /&gt;&lt;BR /&gt;#Get list of feature classes in geodatabase&lt;BR /&gt;FCs = arcpy.ListFeatureClasses()&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#Loop through feature classes in list&lt;BR /&gt;for FC in FCs:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #List fields in feature class&lt;BR /&gt;&amp;nbsp; &amp;nbsp; fields = arcpy.ListFields(FC)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #Loop through fields&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for field in fields:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Check if field has domain&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if field.domain != "":&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #Print feature class, field, domain name&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print FC, field.name, field.domain&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;!--  content transformation source ID: 087E0000000CyIo  --&gt;</description>
      <pubDate>Tue, 23 Jul 2024 18:38:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/identify-features-referenced-by-domain/idi-p/940157</guid>
      <dc:creator>BrianPangtay</dc:creator>
      <dc:date>2024-07-23T18:38:19Z</dc:date>
    </item>
  </channel>
</rss>

