<?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: How to determine if a feature class is an annotation feature class? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1071845#M42404</link>
    <description>&lt;P&gt;Have you tried something like this from &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Annotation#annotation-feature-class" target="_self"&gt;this page&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (selectedLayer is ArcGIS.Desktop.Mapping.AnnotationLayer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 04:18:11 GMT</pubDate>
    <dc:creator>Waffle_House</dc:creator>
    <dc:date>2021-06-24T04:18:11Z</dc:date>
    <item>
      <title>How to determine if a feature class is an annotation feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1071517#M42367</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;For the ArcGIS Pro SDK, is there a way to determine if a feature class is an annotation feature class? I had attempted to do this with an annotation layer but it didn't work:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var annotation_ftr_class = feature_class as AnnotationFeatureClass; // returns null&lt;/LI-CODE&gt;&lt;P&gt;I know that for the ArcObjects SDK, the IFeatureClass.FeatureType property can be used to get the esriFeatureType. And if it's an esriFTAnnotation, it is considered an annotation feature.&lt;/P&gt;&lt;P&gt;Is there something equivalent that can be used for the ArcGIS Pro SDK?&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Hannah&lt;/P&gt;</description>
      <pubDate>Wed, 23 Jun 2021 15:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1071517#M42367</guid>
      <dc:creator>HannahBernal</dc:creator>
      <dc:date>2021-06-23T15:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a feature class is an annotation feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1071845#M42404</link>
      <description>&lt;P&gt;Have you tried something like this from &lt;A href="https://github.com/esri/arcgis-pro-sdk/wiki/ProConcepts-Annotation#annotation-feature-class" target="_self"&gt;this page&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;if (selectedLayer is ArcGIS.Desktop.Mapping.AnnotationLayer)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 04:18:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1071845#M42404</guid>
      <dc:creator>Waffle_House</dc:creator>
      <dc:date>2021-06-24T04:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to determine if a feature class is an annotation feature class?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1073204#M42581</link>
      <description>&lt;P&gt;Thank you for your response. Since I only have the layer_name available, I did try these two methods:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;using (Table table = geodatabase.OpenDataset&amp;lt;Table&amp;gt;(layer_name)) {
FeatureClass feature_class = table as FeatureClass;
// attempt 1:
if (feature_class is AnnotationFeatureClass) {
// feature class is annotation feature class
}

// attempt 2:
AnnotationFeatureClass annoFtrClass = geodb.OpenDataset&amp;lt;AnnotationFeatureClass&amp;gt;(layer_name);
if (annoFtrClass != null) {
 // is annotation feature class
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;But neither way worked. The second method would throw this exception:&amp;nbsp;Could not open the dataset 'annotation_layer' as type AnnotationFeatureClass. Please make sure the dataset type is correct.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Jun 2021 14:52:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/how-to-determine-if-a-feature-class-is-an/m-p/1073204#M42581</guid>
      <dc:creator>HannahBernal</dc:creator>
      <dc:date>2021-06-28T14:52:07Z</dc:date>
    </item>
  </channel>
</rss>

