<?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: Handle event for button added inside Inventor User Interface in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3458924#M136355</link>
    <description>&lt;P&gt;Brian's comment is right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Viewing your first post, I thought the button is created by you from Inventor UI, instead of the program, so I suggested you to listen to OnActivateCommand event. But you should directly listen to OnExecute event if this button is created by your program. They are two different situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if we can still add OnExecute event handler to the button that is created manually from UI. I have not tested this. If you have such need, you can check this way. Using OnExecute should be more efficient than using OnActivateCommand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2012 01:47:10 GMT</pubDate>
    <dc:creator>barbara.han</dc:creator>
    <dc:date>2012-05-16T01:47:10Z</dc:date>
    <item>
      <title>Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455150#M136349</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to develop external application.First I run the Inventor.Open new part in Inventor.After that create new panel and button inside the panel successfully in Inventor UI.But I am not able to catch the event when press on the button.&lt;/P&gt;&lt;P&gt;Any suggestion is most welcome&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 May 2012 10:03:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455150#M136349</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-13T10:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455532#M136350</link>
      <description>Have you tried listening to UserInputEvents.OnActivateCommand event? It should return you the command name which you defined, so you can have a chance to perform your logic.

If above way doesn't work, the another solution is to call ControlDefinition.Delete method on the button that you created through UI, and create a new ControlDefinition through programming, then add it to the panel. This way, OnExecute event should fire when the button is pressed from UI.</description>
      <pubDate>Mon, 14 May 2012 06:31:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455532#M136350</guid>
      <dc:creator>barbara.han</dc:creator>
      <dc:date>2012-05-14T06:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455710#M136351</link>
      <description>Hi , Thanks for reply. I would like send demo project to you. I have applied the suggestion mentioned by you, still it is not working. I have written the one main function in DLL and reffering this DLL in EXE Application. Please check the attached code.</description>
      <pubDate>Mon, 14 May 2012 10:22:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3455710#M136351</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-14T10:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3457220#M136352</link>
      <description>&lt;P&gt;I have not seen sample attached. Where is it?&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 06:08:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3457220#M136352</guid>
      <dc:creator>barbara.han</dc:creator>
      <dc:date>2012-05-15T06:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3457316#M136353</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;Please see the attached code.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 08:13:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3457316#M136353</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-15T08:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3458742#M136354</link>
      <description>&lt;P&gt;I think you're just listening for the wrong event.&amp;nbsp; The event you want to handle is the OnExecute event of ButtonDefinition object.&amp;nbsp; This is the appropriate one to listen to for your own buttons.&amp;nbsp; The OnActivateCommand event is for listening for the execution of standard Inventor commands, not buttons that have been added through the API.&amp;nbsp; I've attached a simplified program that's a bit easier to follow since it gets rid of the redirection in your original code.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2012 21:44:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3458742#M136354</guid>
      <dc:creator>ekinsb</dc:creator>
      <dc:date>2012-05-15T21:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3458924#M136355</link>
      <description>&lt;P&gt;Brian's comment is right.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Viewing your first post, I thought the button is created by you from Inventor UI, instead of the program, so I suggested you to listen to OnActivateCommand event. But you should directly listen to OnExecute event if this button is created by your program. They are two different situation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know if we can still add OnExecute event handler to the button that is created manually from UI. I have not tested this. If you have such need, you can check this way. Using OnExecute should be more efficient than using OnActivateCommand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 01:47:10 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3458924#M136355</guid>
      <dc:creator>barbara.han</dc:creator>
      <dc:date>2012-05-16T01:47:10Z</dc:date>
    </item>
    <item>
      <title>Re: Handle event for button added inside Inventor User Interface</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3459082#M136356</link>
      <description>&lt;P&gt;Thanks it is working.&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2012 06:49:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/handle-event-for-button-added-inside-inventor-user-interface/m-p/3459082#M136356</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-05-16T06:49:12Z</dc:date>
    </item>
  </channel>
</rss>

