<?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: Activate Tool from Docked Window in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363917#M9578</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey. I solved it by doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ICommandItem deepARCTool = ArcMap.Application.Document.CommandBars.Find("deepARC_GDLM_Root");&lt;BR /&gt; ArcMap.Application.CurrentTool = deepARCTool;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have another problem. I am using this to also open a dockable window. So how can I toggle the dockable window as when using a button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I press my tool in the toolbar and my dockable window opens. If I close the dockable windows and press the tool again in the toolbar the dockable windows wont open. Must I set the dockable windows to null or how is this made?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Jun 2017 09:51:20 GMT</pubDate>
    <dc:creator>AlexanderMogren</dc:creator>
    <dc:date>2017-06-01T09:51:20Z</dc:date>
    <item>
      <title>Activate Tool from Docked Window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363915#M9576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everybody.&lt;/P&gt;&lt;P&gt;I have a little question. I know that what I&amp;nbsp;want to do this can be done with just adding a Tool Add-in but I want to do this from my Docked window.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a checkbox and when it is checked I override the OnMouseDown for the docked window but I want to listen to the OnMouseDown in the IMxDocument.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;protected override void OnMouseDown(MouseEventArgs e)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;base.OnMouseDown(e);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (mapLocation.Checked)&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Windows.Forms.Cursor.Current = Cursors.Arrow;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IMxDocument mDoc = ArcMap.Application.Document as IMxDocument;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IPoint mPoint;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mPoint = mDoc.CurrentLocation;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;double lng, lat;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lng = mPoint.X;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lat = mPoint.Y;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;MessageBox.Show(lng+", "+lat,"Retrived Map Data");&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would like this code to fire when I pressing in the Data View and not in the Dockable Window as it does now.&lt;/P&gt;&lt;P&gt;Thankful for answers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 21 May 2017 18:42:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363915#M9576</guid>
      <dc:creator>AlexanderMogren</dc:creator>
      <dc:date>2017-05-21T18:42:11Z</dc:date>
    </item>
    <item>
      <title>Re: Activate Tool from Docked Window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363916#M9577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure what you are asking is possible. The&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;OnMouseDown event is something that is fired off from a &lt;STRONG&gt;tool&lt;/STRONG&gt; when you click on the map, so a tool needs to be active to fire the event.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I did something similar in the past, I had a standard button on a docked window; when clicked on it got a handle on an addin tool and then added an event handler to it called grabID. The addin tool raised the event grabID in the&amp;nbsp;&lt;SPAN&gt;OnMouseDown event of the tool. I also added to the tool a public function that would return the XY of the point clicked at in the&amp;nbsp;OnMouseDown event. The dockable window was listening out for the grabID event and then read the XY from the public function. &amp;nbsp;This was my method for capturing tool clicks on maps by the docked window.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 09:10:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363916#M9577</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2017-06-01T09:10:47Z</dc:date>
    </item>
    <item>
      <title>Re: Activate Tool from Docked Window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363917#M9578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey. I solved it by doing this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ICommandItem deepARCTool = ArcMap.Application.Document.CommandBars.Find("deepARC_GDLM_Root");&lt;BR /&gt; ArcMap.Application.CurrentTool = deepARCTool;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have another problem. I am using this to also open a dockable window. So how can I toggle the dockable window as when using a button?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I press my tool in the toolbar and my dockable window opens. If I close the dockable windows and press the tool again in the toolbar the dockable windows wont open. Must I set the dockable windows to null or how is this made?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 09:51:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363917#M9578</guid>
      <dc:creator>AlexanderMogren</dc:creator>
      <dc:date>2017-06-01T09:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Activate Tool from Docked Window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363918#M9579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the record there is &lt;A href="https://gis.stackexchange.com/questions/220280/get-information-from-a-tool-in-arcobjects/220290#220290"&gt;a thread over on GIS SE&lt;/A&gt; that is similar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:14:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363918#M9579</guid>
      <dc:creator>DuncanHornby</dc:creator>
      <dc:date>2017-06-01T18:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: Activate Tool from Docked Window</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363919#M9580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok didnt know that. You dont know how to fix existing featureclass data that now shows in the data view.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:19:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/activate-tool-from-docked-window/m-p/363919#M9580</guid>
      <dc:creator>AlexanderMogren</dc:creator>
      <dc:date>2017-06-01T18:19:41Z</dc:date>
    </item>
  </channel>
</rss>

