<?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: Getting domain and subtypes values in Arcobjects C# in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235330#M20550</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;It helps!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Nov 2022 12:16:48 GMT</pubDate>
    <dc:creator>ShanmugapriyaL1</dc:creator>
    <dc:date>2022-11-28T12:16:48Z</dc:date>
    <item>
      <title>Getting domain and subtypes values in Arcobjects C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1234830#M20542</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am new to this ArcObjects SDK C#.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I want to get domain values and subtypes values of a field in the geodatabase using ArcObjects SDK C#.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me in this.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 12:35:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1234830#M20542</guid>
      <dc:creator>ShanmugapriyaL1</dc:creator>
      <dc:date>2022-11-24T12:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Getting domain and subtypes values in Arcobjects C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1234923#M20545</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Look here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.stackexchange.com/questions/365039/arcobjects-vb-net-looping-through-domains-of-a-subtype" target="_self"&gt;https://gis.stackexchange.com/questions/365039/arcobjects-vb-net-looping-through-domains-of-a-subtype&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or another way is to get IDomain from IField:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;IDomain pDomain = pField.Domain;
if(pDomain != null) {
	esriDomainType enDType = pDomain.Type;
	if(enDType == esriDomainType.esriDTCodedValue)	{
		ICodedValueDomain pCVDom = pDomain as ICodedValueDomain;
		int nCount = pCVDom.CodeCount;
		for (int j = 0; j &amp;lt; nCount; j++) {
			object v1 = pCVDom.Value[j];
                        string strDName = pCVDom.Name[j];
		}
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2022 21:10:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1234923#M20545</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-11-24T21:10:49Z</dc:date>
    </item>
    <item>
      <title>Re: Getting domain and subtypes values in Arcobjects C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235300#M20548</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can you please tell me how to represent the pField which is in line number 1.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;IFeatureClass pFc = (IFeatureClass)pDs;&lt;/P&gt;&lt;P&gt;for (int i = 0; i &amp;lt; pFc.Fields.FieldCount; i++)&lt;BR /&gt;{&lt;BR /&gt;IField f = pFc.Fields.get_Field(i);&lt;BR /&gt;string name = f.Name;&lt;BR /&gt;Columnlist.Add(name);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IDomain pDomain = f.Domain;&lt;BR /&gt;if (pDomain != null)&lt;BR /&gt;{&lt;BR /&gt;esriDomainType enDType = pDomain.Type;&lt;BR /&gt;if (enDType == esriDomainType.esriDTCodedValue)&lt;BR /&gt;{&lt;BR /&gt;ICodedValueDomain pCVDom = pDomain as ICodedValueDomain;&lt;BR /&gt;int nCount = pCVDom.CodeCount;&lt;BR /&gt;for (int j = 0; j &amp;lt; nCount; j++)&lt;BR /&gt;{&lt;BR /&gt;object v1 = pCVDom.Value[j];&lt;BR /&gt;string strDName = pCVDom.Name[j];&lt;BR /&gt;MessageBox.Show(strDName);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("No coded value domain");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;//collect these...&lt;BR /&gt;// MessageBox.Show(name);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I'm trying above code I'm getting p.domain as NULL.&lt;/P&gt;&lt;P&gt;But the field has domain.&lt;/P&gt;&lt;P&gt;Can you please suggest solution for this? It will be more helpful&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 08:20:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235300#M20548</guid>
      <dc:creator>ShanmugapriyaL1</dc:creator>
      <dc:date>2022-11-28T08:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Getting domain and subtypes values in Arcobjects C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235303#M20549</link>
      <description>&lt;P&gt;I don't know your workflow. You can get it by many different ways. By index or name from IFields type object which you can get from ITable type object (in samples pTable variable)&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;IFields pFields = pTable.Fields;
int iFieldsCount = pFields.FieldCount;
for (int i = 0; i &amp;lt; iFieldsCount; i++)
{
    IField pField = pFields.get_Field(i);
    // code with domain
}&lt;/LI-CODE&gt;&lt;P&gt;or&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;IFields pFields = pTable.Fields;
int fieldIndex = pTable.FindField(fieldName);
IField pField = pFields.get_Field(fieldIndex);&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 28 Nov 2022 08:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235303#M20549</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2022-11-28T08:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting domain and subtypes values in Arcobjects C#</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235330#M20550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;It helps!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 12:16:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/getting-domain-and-subtypes-values-in-arcobjects-c/m-p/1235330#M20550</guid>
      <dc:creator>ShanmugapriyaL1</dc:creator>
      <dc:date>2022-11-28T12:16:48Z</dc:date>
    </item>
  </channel>
</rss>

