<?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 How to get a list of Class Extensions installed on PC? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75857#M2028</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;P&gt;I'm building a geoprocessing tool which allows Class Extensions to be applied to and removed from an object in the geodatabase.&amp;nbsp; Works great, it's in a custom toolbox with user defined input parameters.&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/SPAN&gt; I know the guid of a class extension I can apply it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;Exert from set execute function&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ITable theITable = _utils.OpenTableFromString(thePath);
IClassSchemaEdit classSchemaEdit = (IClassSchemaEdit)theITable;
if (classSchemaEdit == null)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.AddMessage("The selected object does not contain and/or support extension classes.");
}
else
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.AddMessage("The extension class is being set on the selected object");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISchemaLock schemaLock = (ISchemaLock)classSchemaEdit;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Need an exclusive schema lock on the class.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; classSchemaEdit.AlterClassExtensionCLSID(theGUIDUID, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;Exert from ParameterInfo section of tool.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//Could write some code here to pull this list of codes from the geodatabase 
IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass();
pGUIDDomain.AddStringCode("{A GUID GOES HERE}", "Test Class 1");
//pAccumulatorsDomain.AddStringCode("Meters", "Meters");
IGPParameterEdit3 theInputGUID = new GPParameterClass();
theInputGUID.DataType = new GPStringType();
theInputGUID.Value = new GPStringClass();
theInputGUID.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;
theInputGUID.DisplayName = "Input GUID";
theInputGUID.Name = "inputGUID";
theInputGUID.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
theInputGUID.Domain = (IGPDomain)pGUIDDomain;
parameters.Add(theInputGUID);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In there future rather than have the guids hardcoded or in a config file I'd like to find the class extensions that I could apply in the code that I can then populate into a user pick list in the tool.&amp;nbsp; I don't know how to find the list of extensions.&amp;nbsp; I'd rather get a list of class extensions on the PC rather than applied in the geodatabase.&amp;nbsp; Narrowing the list to custom ones would be ideal but not necessary.&amp;nbsp; It isn't meant to be run by generic users, only administrators.&amp;nbsp; Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 22:56:18 GMT</pubDate>
    <dc:creator>TimDine</dc:creator>
    <dc:date>2021-12-10T22:56:18Z</dc:date>
    <item>
      <title>How to get a list of Class Extensions installed on PC?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75857#M2028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;/PRE&gt;&lt;P&gt;I'm building a geoprocessing tool which allows Class Extensions to be applied to and removed from an object in the geodatabase.&amp;nbsp; Works great, it's in a custom toolbox with user defined input parameters.&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;If&lt;/STRONG&gt;&lt;/SPAN&gt; I know the guid of a class extension I can apply it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;Exert from set execute function&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;ITable theITable = _utils.OpenTableFromString(thePath);
IClassSchemaEdit classSchemaEdit = (IClassSchemaEdit)theITable;
if (classSchemaEdit == null)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.AddMessage("The selected object does not contain and/or support extension classes.");
}
else
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; message.AddMessage("The extension class is being set on the selected object");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISchemaLock schemaLock = (ISchemaLock)classSchemaEdit;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Need an exclusive schema lock on the class.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; schemaLock.ChangeSchemaLock(esriSchemaLock.esriExclusiveSchemaLock);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; classSchemaEdit.AlterClassExtensionCLSID(theGUIDUID, null);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; schemaLock.ChangeSchemaLock(esriSchemaLock.esriSharedSchemaLock);
}&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: Consolas;"&gt;Exert from ParameterInfo section of tool.&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;//Could write some code here to pull this list of codes from the geodatabase 
IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass();
pGUIDDomain.AddStringCode("{A GUID GOES HERE}", "Test Class 1");
//pAccumulatorsDomain.AddStringCode("Meters", "Meters");
IGPParameterEdit3 theInputGUID = new GPParameterClass();
theInputGUID.DataType = new GPStringType();
theInputGUID.Value = new GPStringClass();
theInputGUID.Direction = esriGPParameterDirection.esriGPParameterDirectionInput;
theInputGUID.DisplayName = "Input GUID";
theInputGUID.Name = "inputGUID";
theInputGUID.ParameterType = esriGPParameterType.esriGPParameterTypeRequired;
theInputGUID.Domain = (IGPDomain)pGUIDDomain;
parameters.Add(theInputGUID);&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In there future rather than have the guids hardcoded or in a config file I'd like to find the class extensions that I could apply in the code that I can then populate into a user pick list in the tool.&amp;nbsp; I don't know how to find the list of extensions.&amp;nbsp; I'd rather get a list of class extensions on the PC rather than applied in the geodatabase.&amp;nbsp; Narrowing the list to custom ones would be ideal but not necessary.&amp;nbsp; It isn't meant to be run by generic users, only administrators.&amp;nbsp; Thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 22:56:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75857#M2028</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2021-12-10T22:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of Class Extensions installed on PC?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75858#M2029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like just about everything else, there is a COM category for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="119811" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/119811_pastedImage_1.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="119810" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/119810_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You have possibly 3 or more choices of how to get the extensions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) If you have ArcFM installed you can use MMCategoryFactoryClass which will allow you iterate through the extension GUIDs, or create instances of the extensions and get the names from the instances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use the rather limited ArcObjects CategoryFactoryClass to create instances of the extensions, and get the names from the instances.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3) Drop down to .NET or Win32 and query directly e.g. &lt;A href="http://www.codeproject.com/Articles/6938/Using-the-COM-Component-Categories-Manager-in-NET" title="http://www.codeproject.com/Articles/6938/Using-the-COM-Component-Categories-Manager-in-NET"&gt;Using the COM Component Categories Manager in .NET - CodeProject&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 21:33:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75858#M2029</guid>
      <dc:creator>ChrisKushnir</dc:creator>
      <dc:date>2015-07-29T21:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of Class Extensions installed on PC?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75859#M2030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This particular situation I don't have ArcFM.&amp;nbsp; This is a new custom class extension that populates an attribute with some custom code depending on various things, similar to an ArcFM autoupdater.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found a good ArcGIS sample based on your option two which worked perfectly.&amp;nbsp; It now gets guid and name from the TYPE object of the objectCategory and populates them into the domain used by the tool's input parameter.&amp;nbsp; Now if new classes are added in the future they won't be hardcoded in the tool.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IGPCodedValueDomain pGUIDDomain = new GPCodedValueDomainClass();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 1");&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //pGUIDDomain.AddStringCode("{hardcoded GUID}", "Extension 2");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Set up GUID object for the desired component category&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.esriSystem.IUID uid = new ESRI.ArcGIS.esriSystem.UIDClass();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uid.Value = "{D4E2A322-5D59-11D2-89FD-006097AFF44E}"; //GUID of the Class Extension Category&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.esriSystem.ICategoryFactory categoryFactory = new ESRI.ArcGIS.esriSystem.CategoryFactoryClass();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; categoryFactory.CategoryID = (ESRI.ArcGIS.esriSystem.UID)uid;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object object_Category = categoryFactory.CreateNext();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (object_Category != null)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Type theType = object_Category.GetType();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pGUIDDomain.AddStringCode("{"+theType.GUID.ToString()+"}", theType.Name.ToString());&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; object_Category = categoryFactory.CreateNext();&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jul 2015 15:13:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75859#M2030</guid>
      <dc:creator>TimDine</dc:creator>
      <dc:date>2015-07-30T15:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get a list of Class Extensions installed on PC?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75860#M2031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am facing an issue while running a script in Python i.e.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;ERROR 000229: cannot open feature class.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Unable to create object class extension COM Component&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;Failed to execute(Make Feature Layer)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;The feature class is in File Geodatabase. I am able to open the feature class in ArcMap&amp;nbsp;and Arc Catalog.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Sep 2016 12:08:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-get-a-list-of-class-extensions-installed-on/m-p/75860#M2031</guid>
      <dc:creator>HarshitaGupta1</dc:creator>
      <dc:date>2016-09-12T12:08:28Z</dc:date>
    </item>
  </channel>
</rss>

