<?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 Zoom to layer defined by CreateSelectionLayer in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392076#M10441</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have several layers that have been created from a non-displayed "master layer" using IFeatureLayerDefinition2.CreateSelectionLayer to cut down on the number of feature classes stored in a file GeoDatabase (gdb).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This has worked fine adding the layers to the table of contents and only displaying the desired features.&amp;nbsp; However, when using the sample code to Zoom to a Layer (Displaying a TOCControl Context Menu sample), the extent sent via "ref layer" is the full extent of all features that were in the feature class up to that point.&amp;nbsp; For example Layer1 of Rectangle 1 zooms to just Rectangle 1.&amp;nbsp; Layer 3 created by querying for Rectangle 3 zooms to rectangles 1, 2 and 3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I zoom only into the feature(s) that were part of the original query in the CreateSelectionLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Glenn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 May 2013 20:58:08 GMT</pubDate>
    <dc:creator>GlennNead</dc:creator>
    <dc:date>2013-05-08T20:58:08Z</dc:date>
    <item>
      <title>Zoom to layer defined by CreateSelectionLayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392076#M10441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have several layers that have been created from a non-displayed "master layer" using IFeatureLayerDefinition2.CreateSelectionLayer to cut down on the number of feature classes stored in a file GeoDatabase (gdb).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This has worked fine adding the layers to the table of contents and only displaying the desired features.&amp;nbsp; However, when using the sample code to Zoom to a Layer (Displaying a TOCControl Context Menu sample), the extent sent via "ref layer" is the full extent of all features that were in the feature class up to that point.&amp;nbsp; For example Layer1 of Rectangle 1 zooms to just Rectangle 1.&amp;nbsp; Layer 3 created by querying for Rectangle 3 zooms to rectangles 1, 2 and 3.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I zoom only into the feature(s) that were part of the original query in the CreateSelectionLayer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -- Glenn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 20:58:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392076#M10441</guid>
      <dc:creator>GlennNead</dc:creator>
      <dc:date>2013-05-08T20:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to layer defined by CreateSelectionLayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392077#M10442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think you'll have to create your own extent. Call IGeoFeatureLayer::SearchDisplayFeatures on the layer, which will restrict the results to just those in the selection layer. Get the extent of each feature returned and union it with a "master" envelope. You'll have to build a SpatialFilter to pass to this function; you should only need the SHAPE field for this. You'll need to be comfortable working with geodatabase cursors.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 May 2013 22:46:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392077#M10442</guid>
      <dc:creator>PeterYurkosky1</dc:creator>
      <dc:date>2013-05-08T22:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to layer defined by CreateSelectionLayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392078#M10443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Pete,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the quick reply!&amp;nbsp; I'll give it a try and let you know the results.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Glenn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 May 2013 12:28:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392078#M10443</guid>
      <dc:creator>GlennNead</dc:creator>
      <dc:date>2013-05-09T12:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to layer defined by CreateSelectionLayer</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392079#M10444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Pete,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There was no difference in my case between IGeoFeatureLayer.FeatureClass and DisplayFeatureClass properties-- both returned the correct feature count that I was expecting.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did have to create a feature cursor and loop through the features and union the envelopes as you indicated, so that was the solution.&amp;nbsp; I just now need to go back and work in the case when a group layer is selected and have to drill down to each of the feature layers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again for the quick response!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-- Glenn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 May 2013 20:24:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-layer-defined-by-createselectionlayer/m-p/392079#M10444</guid>
      <dc:creator>GlennNead</dc:creator>
      <dc:date>2013-05-10T20:24:51Z</dc:date>
    </item>
  </channel>
</rss>

