<?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: IFeatureLayer count for a complex group layer? Similar to IMap.Layers property in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501884#M13481</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not sure if I 100% understand, but you are trying to get at the layers in an ICompositeLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can't you just get the Count and then loop through the layers using the Layer[index]?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2013 11:48:56 GMT</pubDate>
    <dc:creator>JohnStephens</dc:creator>
    <dc:date>2013-10-09T11:48:56Z</dc:date>
    <item>
      <title>IFeatureLayer count for a complex group layer? Similar to IMap.Layers property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501883#M13480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This might be a lost cause, but worth a shot...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm curious about a potential functionality exactly like &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//001200000m9t000000" rel="nofollow" target="_blank"&gt;IMap.Layers&lt;/A&gt;&lt;SPAN&gt;, but instead of IMap, I want ICompositeLayer (or any reference to a group layer really).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for the most elegant solution to getting a count of all IFeatureLayer layers, but only within a relatively complex group layer, not the entire map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my head, I would call ICompositeLayer.Layers(&amp;lt;insert IFeatureLayer UID here&amp;gt;, True), if it existed. But it doesn't, and I'm not sure if anything like it does.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, the code I'm working with calls a function "GetNumLayers" which has a series of nested loops checking if a particular ILayer, is of type IFeatureLayer or not and adding +1 to the counter, and then returning the total. I'm convinced something faster exists as an alternative. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think it would be a good learning experience, and to be honest, I'm really not worried about the time it takes, rather the "best" way to achieve this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any assistance would be much appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 20:09:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501883#M13480</guid>
      <dc:creator>deleted-user-VeC5jUIlNXtq</dc:creator>
      <dc:date>2013-10-08T20:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureLayer count for a complex group layer? Similar to IMap.Layers property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501884#M13481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not sure if I 100% understand, but you are trying to get at the layers in an ICompositeLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can't you just get the Count and then loop through the layers using the Layer[index]?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 11:48:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501884#M13481</guid>
      <dc:creator>JohnStephens</dc:creator>
      <dc:date>2013-10-09T11:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureLayer count for a complex group layer? Similar to IMap.Layers property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501885#M13482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sorry, hopefully this will help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unfortunately ICompositeLayer.Count would return a count similar to pMap.LayerCount wouldn't it? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The main group layer itself has multiple levels: sub-group layers and feature layers all kind of mixed in. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm looking for specifically: a count of feature layers (regardless of how deep they are). I don't want to include sub-group layers (that may contain feature layers), in that count. Only layers that are TypeOf IFeatureLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Definitely an odd problem I'll admit that haha. Anyways, hopefully that clarifies things a little bit.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the suggestion!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 12:53:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501885#M13482</guid>
      <dc:creator>deleted-user-VeC5jUIlNXtq</dc:creator>
      <dc:date>2013-10-09T12:53:43Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureLayer count for a complex group layer? Similar to IMap.Layers property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501886#M13483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can write a function that counts the feature layers in a given group layer by looping through the layers in that group layer.&amp;nbsp; For each layer, check the type.&amp;nbsp; If it's a feature layer, then add to the count.&amp;nbsp; If it's a group layer then call the function recursively and add it's return value to the layer count.&amp;nbsp; The function returns the count.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501886#M13483</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2013-10-09T13:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: IFeatureLayer count for a complex group layer? Similar to IMap.Layers property</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501887#M13484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm, was hoping there would be a hidden property I wasn't aware of, oh well. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently, that's how the count is retrieved, though I didn't think about recursion, that's likely the faster method than a series of loops (also looks nicer).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Neil.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 13:43:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/ifeaturelayer-count-for-a-complex-group-layer/m-p/501887#M13484</guid>
      <dc:creator>deleted-user-VeC5jUIlNXtq</dc:creator>
      <dc:date>2013-10-09T13:43:36Z</dc:date>
    </item>
  </channel>
</rss>

