<?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: use inventor command in contextual menu in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3842996#M131459</link>
    <description>&lt;P&gt;You can use the event&amp;nbsp;UserInputEvents.&lt;STRONG&gt;OnActivateCommand.&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Apr 2013 08:45:37 GMT</pubDate>
    <dc:creator>YuhanZhang</dc:creator>
    <dc:date>2013-04-10T08:45:37Z</dc:date>
    <item>
      <title>use inventor command in contextual menu</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3841889#M131458</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;is there any possibility to use inventor commands like "AppContextual_ContinueCmd" in addin? I need to add to RadialMarkingMenu commands for continue or cancel during selection.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;private void UIEvents_OnRadialMarkingMenu(Inventor.ObjectsEnumerator toEntities, Inventor.SelectionDeviceEnum toSelDevice,
                                                  Inventor.RadialMarkingMenu toRadialMenu, Inventor.NameValueMap toAddInfo)
        {
            if (toSelDevice == Inventor.SelectionDeviceEnum.kGraphicsWindowSelection)
            {
                toRadialMenu.EastControl = this.oApp.CommandManager.ControlDefinitions["AppContextual_CancelCmd"];
                toRadialMenu.WestControl = this.oApp.CommandManager.ControlDefinitions["AppContextual_ContinueCmd"];
            }
        }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;The menu is correctly shown , command " AppContextual_CancelCmd" send Esc to events, but I have no idea how to catch "AppContextual_ContinueCmd". is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;</description>
      <pubDate>Tue, 09 Apr 2013 13:20:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3841889#M131458</guid>
      <dc:creator>petrxn</dc:creator>
      <dc:date>2013-04-09T13:20:01Z</dc:date>
    </item>
    <item>
      <title>Re: use inventor command in contextual menu</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3842996#M131459</link>
      <description>&lt;P&gt;You can use the event&amp;nbsp;UserInputEvents.&lt;STRONG&gt;OnActivateCommand.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Apr 2013 08:45:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3842996#M131459</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2013-04-10T08:45:37Z</dc:date>
    </item>
    <item>
      <title>Re: use inventor command in contextual menu</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3857483#M131460</link>
      <description>&lt;P&gt;Thank you for the tip, but this does not work. I have tried to catch these command, but this event is not fired.&lt;/P&gt;&lt;P&gt;I also tried to create my own button, but I have found that I do not understand how the definition works. If I define button in class (constructor), first time when I call this class everything is ok, but if I call this class second time and more, then I get error as attached. It seems that definition is not "live" with the class, but is still in memory and is not possible to define the same button again. What is the correct way? To define all possible buttons in addin constructor? Or is there way to destroy definition?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Apr 2013 07:54:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3857483#M131460</guid>
      <dc:creator>petrxn</dc:creator>
      <dc:date>2013-04-12T07:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: use inventor command in contextual menu</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3871475#M131461</link>
      <description>&lt;P&gt;The error seems happening is because of you are attempting to create the same control definition twice, to avoid this you can check if a control definition already exists before creating it. There are several samples in Inventor SDK, you can find them after you install the DeveloperTools.msi(like in win7, after installing the DeveloperTools, you can get the samples in C:\Users\Public\Documents\Autodesk\Inventor 20xx\SDK\DeveloperTools\Samples), and an addin named SimpleAddin maybe an expmple for you to learn how to create control definitions and when to destroy them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 03:10:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3871475#M131461</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2013-04-15T03:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: use inventor command in contextual menu</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3872176#M131462</link>
      <description>&lt;P&gt;Thank you, &amp;nbsp;finally I have made my class Disposable and in Dispose() method I delete these button definitions. Now seems that it works as I expect.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2013 17:58:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/use-inventor-command-in-contextual-menu/m-p/3872176#M131462</guid>
      <dc:creator>petrxn</dc:creator>
      <dc:date>2013-04-15T17:58:22Z</dc:date>
    </item>
  </channel>
</rss>

