<?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 VB.NET Zoom to ObjectID in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-zoom-to-objectid/m-p/560405#M15131</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I query Address from Layer to Listview with ObjectID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I zoom to&amp;nbsp;&lt;SPAN&gt;ObjectID&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pMxDoc As IMxDocument&lt;BR /&gt; pMxDoc = My.ArcMap.Application.Document&lt;/P&gt;&lt;P&gt;Dim pMap As IMap&lt;BR /&gt; pMap = pMxDoc.FocusMap&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Dim pFlayer As IFeatureLayer = getLayerByName(Layername)&lt;BR /&gt; 'get the feature class &lt;BR /&gt; Dim pFeatureClass As IFeatureClass = pFlayer.FeatureClass&lt;/P&gt;&lt;P&gt;Dim pFeature As IFeature = pFeatureClass.GetFeature(ListView1.SelectedItems(0).Text)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Dim pActiveView As IActiveView&lt;BR /&gt; pActiveView = pMap&lt;/P&gt;&lt;P&gt;pMap.ClearSelection()&lt;/P&gt;&lt;P&gt;pMap.SelectFeature(pFlayer, pFeature)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Oct 2017 10:48:00 GMT</pubDate>
    <dc:creator>SigurdurGear</dc:creator>
    <dc:date>2017-10-12T10:48:00Z</dc:date>
    <item>
      <title>VB.NET Zoom to ObjectID</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-zoom-to-objectid/m-p/560405#M15131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I query Address from Layer to Listview with ObjectID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can I zoom to&amp;nbsp;&lt;SPAN&gt;ObjectID&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim pMxDoc As IMxDocument&lt;BR /&gt; pMxDoc = My.ArcMap.Application.Document&lt;/P&gt;&lt;P&gt;Dim pMap As IMap&lt;BR /&gt; pMap = pMxDoc.FocusMap&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Dim pFlayer As IFeatureLayer = getLayerByName(Layername)&lt;BR /&gt; 'get the feature class &lt;BR /&gt; Dim pFeatureClass As IFeatureClass = pFlayer.FeatureClass&lt;/P&gt;&lt;P&gt;Dim pFeature As IFeature = pFeatureClass.GetFeature(ListView1.SelectedItems(0).Text)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Dim pActiveView As IActiveView&lt;BR /&gt; pActiveView = pMap&lt;/P&gt;&lt;P&gt;pMap.ClearSelection()&lt;/P&gt;&lt;P&gt;pMap.SelectFeature(pFlayer, pFeature)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Oct 2017 10:48:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-zoom-to-objectid/m-p/560405#M15131</guid>
      <dc:creator>SigurdurGear</dc:creator>
      <dc:date>2017-10-12T10:48:00Z</dc:date>
    </item>
    <item>
      <title>Re: VB.NET Zoom to ObjectID</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-zoom-to-objectid/m-p/560406#M15132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you post &lt;SPAN style="text-decoration: underline;"&gt;any code&lt;/SPAN&gt; please format it, edit your question and follow the instructions &lt;A _jive_internal="true" href="https://community.esri.com/docs/DOC-8691-posting-code-with-syntax-highlighting-on-geonet"&gt;here&lt;/A&gt;&amp;nbsp;it allows us to follow your code and help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are at least two ways to do this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Call the existing zoom to selected features button but if you have other selected features in other layers it would zoom to them all.&lt;/LI&gt;&lt;LI&gt;Construct the bounding extent of your selection and zoom to that, sample code can be found &lt;A href="http://support.esri.com/en/technical-article/000008499"&gt;here&lt;/A&gt;.&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Oct 2017 14:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/vb-net-zoom-to-objectid/m-p/560406#M15132</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2017-10-16T14:19:36Z</dc:date>
    </item>
  </channel>
</rss>

