<?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 Selected Features in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-selected-features/m-p/579916#M15658</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using this code to try to zoom to selected features, but it isn't working.&amp;nbsp; Regardless of what I enter as the uid, cmdItem is always NULL.&amp;nbsp; I'm using the info on this page (&lt;/SPAN&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ArcGISDevHelp/TechnicalDocuments/Guids/ControlsCommands.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ArcGISDevHelp/TechnicalDocuments/Guids/ControlsCommands.htm&lt;/A&gt;&lt;SPAN&gt;) to set my uid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ESRI.ArcGIS.Framework.ICommandBars cmdBar = GlobalVars.m_application.Document.CommandBars;
UID uid = new UIDClass();
uid.Value = "{06DD3F57-CF78-41BA-83F4-D13A8679914F}";
ESRI.ArcGIS.Framework.ICommandItem cmdItem = cmdBar.Find(uid, false, false);
if (cmdItem != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdItem.Execute();

//Update the selected features on the map
ISelectionEvents selEvents = (ISelectionEvents)map;
selEvents.SelectionChanged();

//Refresh the map
pMxDoc.ActiveView.Refresh();

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:56:17 GMT</pubDate>
    <dc:creator>BBulla</dc:creator>
    <dc:date>2021-12-12T00:56:17Z</dc:date>
    <item>
      <title>Zoom to Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-selected-features/m-p/579916#M15658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using this code to try to zoom to selected features, but it isn't working.&amp;nbsp; Regardless of what I enter as the uid, cmdItem is always NULL.&amp;nbsp; I'm using the info on this page (&lt;/SPAN&gt;&lt;A href="http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ArcGISDevHelp/TechnicalDocuments/Guids/ControlsCommands.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://edndoc.esri.com/arcobjects/9.1/default.asp?URL=/arcobjects/9.1/ArcGISDevHelp/TechnicalDocuments/Guids/ControlsCommands.htm&lt;/A&gt;&lt;SPAN&gt;) to set my uid.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
ESRI.ArcGIS.Framework.ICommandBars cmdBar = GlobalVars.m_application.Document.CommandBars;
UID uid = new UIDClass();
uid.Value = "{06DD3F57-CF78-41BA-83F4-D13A8679914F}";
ESRI.ArcGIS.Framework.ICommandItem cmdItem = cmdBar.Find(uid, false, false);
if (cmdItem != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdItem.Execute();

//Update the selected features on the map
ISelectionEvents selEvents = (ISelectionEvents)map;
selEvents.SelectionChanged();

//Refresh the map
pMxDoc.ActiveView.Refresh();

&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:56:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-selected-features/m-p/579916#M15658</guid>
      <dc:creator>BBulla</dc:creator>
      <dc:date>2021-12-12T00:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Zoom to Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-selected-features/m-p/579917#M15659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;{AB073B49-DE5E-11D1-AA80-00C04FA37860} seems to work.&amp;nbsp; Does anyone know if a site with the proper UID for all commands??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Aug 2010 13:10:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/zoom-to-selected-features/m-p/579917#M15659</guid>
      <dc:creator>BBulla</dc:creator>
      <dc:date>2010-08-30T13:10:26Z</dc:date>
    </item>
  </channel>
</rss>

