<?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: IGxObject.Category Values in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470332#M12755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thomas,&lt;BR /&gt;&lt;BR /&gt;What's the better way of catching the objects that you've found? I'm coding in C# so can't use GetType as it just returns System.__ComObject (other casts I've tried return null for some reason. I need to get a reference to the IWorkspace from the currently selected IGXObject.&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;&lt;BR /&gt;Brian O'Hare&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian, try the following code.&amp;nbsp; You'll have to translate to C#.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If TypeOf gxObject Is IGxDataset Then
&amp;nbsp; Dim gxDataset As IGxDataset = DirectCast(gxObject, IGxDataset)
&amp;nbsp; Dim dataset As IDataset = gxDataset.Dataset
&amp;nbsp; Dim workspace As IWorkspace = dataset.Workspace
End If&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 20:49:56 GMT</pubDate>
    <dc:creator>NeilClemmons</dc:creator>
    <dc:date>2021-12-11T20:49:56Z</dc:date>
    <item>
      <title>IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470326#M12749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone know if there is a list of possible values for the IGxObject.Category property?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Jul 2010 04:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470326#M12749</guid>
      <dc:creator>ThomasPolden</dc:creator>
      <dc:date>2010-07-13T04:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470327#M12750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have done a bit of searching, but I can only find reference to ESRI probably having one not actually were to find it. Not having much luck with the ArcGIS program help either.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Jul 2010 22:59:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470327#M12750</guid>
      <dc:creator>ThomasPolden</dc:creator>
      <dc:date>2010-07-18T22:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470328#M12751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can have unlimited values as you can create your own impementation of the IGXObject interface - and specify whatever you want for the Catalog property.&amp;nbsp; So you can't really have a definitive list.&amp;nbsp; It does seem odd though that it's not easy to find a list of the standard ESRI ones.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The only help I can give is that if you run ArcGIS\bin\categories.exe and look under ESRI GX Object Factories then this gives you a list of all the implementations of IGXObject on your machine, although it doesn't give you the Catalog values.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What did you need a full list for?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 13:43:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470328#M12751</guid>
      <dc:creator>AndrewMay</dc:creator>
      <dc:date>2010-07-27T13:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470329#M12752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Take a look at this &lt;/SPAN&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=133264&amp;amp;mc=4#msgid385462" rel="nofollow noopener noreferrer" target="_blank"&gt;thread&lt;/A&gt;&lt;SPAN&gt; for alternate code to determine the type of an object from IGXObject. One problem I ran into when using IGxObject.Category is that the values are localized. For example, I wrote an application that worked perfectly fine on English language machines, but crashed in other languages. In my code, I was checking the type of table that was selected by a user. If I select a dbf file, this code will return a ShapefileWorkspaceFactoryClass.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Select Case pGxObj.Category
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "Personal Geodatabase Table"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFact = New ESRI.ArcGIS.DataSourcesGDB.AccessWorkspaceFactoryClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "File Geodatabase Table"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFact = New ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "dBASE Table"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFact = New ESRI.ArcGIS.DataSourcesFile.ShapefileWorkspaceFactoryClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "SDC Feature Class"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFact = New ESRI.ArcGIS.DataSourcesFile.SDCWorkspaceFactoryClass
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "SDE Table"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFact = New ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactory
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case Else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.Windows.Forms.MessageBox.Show("Data type '" &amp;amp; pGxObj.Category &amp;amp; "' has not been coded yet...")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End Select
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, when a user with a German language machine selected a dbf file, he reported getting the error message "Data type 'dBASE-Tabelle' has not been coded yet".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:49:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470329#M12752</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T20:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470330#M12753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a application that searches through our filesystem and reports back on spatial data. I was using IGxObject.Category to catch the spatial data. But I noticed that it was not reporting back on some raster files. I eventually figured out I was only catching "File Geodatabase Raster Dataset" files when some of them were actually coming through IGxObject.Category as "fgdb Raster" or something similar. I just wanted a list of standard ESRI categories to make sure I was not missing anything else. But I have figured out a better way of catching everything now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Still, it would be usefully to have such a list. One has to exist somewhere.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 23:07:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470330#M12753</guid>
      <dc:creator>ThomasPolden</dc:creator>
      <dc:date>2010-07-27T23:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470331#M12754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thomas,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What's the better way of catching the objects that you've found? I'm coding in C# so can't use GetType as it just returns System.__ComObject (other casts I've tried return null for some reason. I need to get a reference to the IWorkspace from the currently selected IGXObject.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian O'Hare&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 28 Aug 2010 18:34:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470331#M12754</guid>
      <dc:creator>BrianO_Hare</dc:creator>
      <dc:date>2010-08-28T18:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: IGxObject.Category Values</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470332#M12755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thomas,&lt;BR /&gt;&lt;BR /&gt;What's the better way of catching the objects that you've found? I'm coding in C# so can't use GetType as it just returns System.__ComObject (other casts I've tried return null for some reason. I need to get a reference to the IWorkspace from the currently selected IGXObject.&lt;BR /&gt;&lt;BR /&gt;cheers,&lt;BR /&gt;&lt;BR /&gt;Brian O'Hare&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Brian, try the following code.&amp;nbsp; You'll have to translate to C#.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;If TypeOf gxObject Is IGxDataset Then
&amp;nbsp; Dim gxDataset As IGxDataset = DirectCast(gxObject, IGxDataset)
&amp;nbsp; Dim dataset As IDataset = gxDataset.Dataset
&amp;nbsp; Dim workspace As IWorkspace = dataset.Workspace
End If&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:49:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/igxobject-category-values/m-p/470332#M12755</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2021-12-11T20:49:56Z</dc:date>
    </item>
  </channel>
</rss>

