<?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 Menu Item not showing up in environemnts in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703010#M158595</link>
    <description>I have an addin that should show up in several environments but it only &lt;BR /&gt;
seems to show up in the part environment..&lt;BR /&gt;
&lt;BR /&gt;
Also, how do you position the menu item at the same level in each menu (for &lt;BR /&gt;
example right above Add-in or Macros...)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If FirstTime = True Then&lt;BR /&gt;
&lt;BR /&gt;
    'create a new toolbar&lt;BR /&gt;
    'Dim oCommandBarAutoSaveDWF As CommandBar&lt;BR /&gt;
    'Set oCommandBarAutoSaveDWF = &lt;BR /&gt;
oApp.UserInterfaceManager.CommandBars.Add("AutoSaveDWF", _&lt;BR /&gt;
        "AutoSaveDWFToolbarIntName", , &lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    'add the buttons to the toolbar&lt;BR /&gt;
    'oCommandBarAutoSaveDWF.Controls.AddButton oButtonDefAutoSaveDWF&lt;BR /&gt;
&lt;BR /&gt;
    ' Find the command bar of the "Tools" pop-up menu.&lt;BR /&gt;
    Dim oUIManager As UserInterfaceManager&lt;BR /&gt;
    Set oUIManager = oApp.UserInterfaceManager&lt;BR /&gt;
    ' Create a command bar of a pop-up type for a flyout.&lt;BR /&gt;
    Dim oFlyOutCmdBar As CommandBar&lt;BR /&gt;
    Set oFlyOutCmdBar = oUIManager.CommandBars.Add("AutoDWF", _&lt;BR /&gt;
           "FlyoutCmdBar", kPopUpCommandBar, &lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    ' Add 1 button to the fly-out command bar.&lt;BR /&gt;
    Call oFlyOutCmdBar.Controls.AddButton(moShadyBobUtilBar2)&lt;BR /&gt;
&lt;BR /&gt;
    Dim oMenuPopupCmdBar As CommandBar&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AppToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AssemblyToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("DrawingMangerToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("NotebookToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("PartFeatureToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("PartToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("PresentationToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Thanks, -Sean</description>
    <pubDate>Wed, 12 Jul 2006 23:16:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2006-07-12T23:16:08Z</dc:date>
    <item>
      <title>Menu Item not showing up in environemnts</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703010#M158595</link>
      <description>I have an addin that should show up in several environments but it only &lt;BR /&gt;
seems to show up in the part environment..&lt;BR /&gt;
&lt;BR /&gt;
Also, how do you position the menu item at the same level in each menu (for &lt;BR /&gt;
example right above Add-in or Macros...)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If FirstTime = True Then&lt;BR /&gt;
&lt;BR /&gt;
    'create a new toolbar&lt;BR /&gt;
    'Dim oCommandBarAutoSaveDWF As CommandBar&lt;BR /&gt;
    'Set oCommandBarAutoSaveDWF = &lt;BR /&gt;
oApp.UserInterfaceManager.CommandBars.Add("AutoSaveDWF", _&lt;BR /&gt;
        "AutoSaveDWFToolbarIntName", , &lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    'add the buttons to the toolbar&lt;BR /&gt;
    'oCommandBarAutoSaveDWF.Controls.AddButton oButtonDefAutoSaveDWF&lt;BR /&gt;
&lt;BR /&gt;
    ' Find the command bar of the "Tools" pop-up menu.&lt;BR /&gt;
    Dim oUIManager As UserInterfaceManager&lt;BR /&gt;
    Set oUIManager = oApp.UserInterfaceManager&lt;BR /&gt;
    ' Create a command bar of a pop-up type for a flyout.&lt;BR /&gt;
    Dim oFlyOutCmdBar As CommandBar&lt;BR /&gt;
    Set oFlyOutCmdBar = oUIManager.CommandBars.Add("AutoDWF", _&lt;BR /&gt;
           "FlyoutCmdBar", kPopUpCommandBar, &lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    ' Add 1 button to the fly-out command bar.&lt;BR /&gt;
    Call oFlyOutCmdBar.Controls.AddButton(moShadyBobUtilBar2)&lt;BR /&gt;
&lt;BR /&gt;
    Dim oMenuPopupCmdBar As CommandBar&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AppToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AssemblyToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("DrawingMangerToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("NotebookToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("PartFeatureToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("PartToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = &lt;BR /&gt;
oUIManager.CommandBars.Item("PresentationToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Thanks, -Sean</description>
      <pubDate>Wed, 12 Jul 2006 23:16:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703010#M158595</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-12T23:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Item not showing up in environemnts</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703011#M158596</link>
      <description>Sean,&lt;BR /&gt;
&lt;BR /&gt;
&amp;lt;&lt;I have="" an="" addin="" that="" should="" show="" up="" in="" several="" environments="" but="" it="" only=""&gt;&lt;BR /&gt;
seems to show up in the part environment..&amp;gt;&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I'm not sure I understand. From your code, it does seem like you are doing &lt;BR /&gt;
the right thing by getting the "Tool" menus from all environments and adding &lt;BR /&gt;
your flyout to all of them. I tested your code and it does seem to add the &lt;BR /&gt;
flyout to all environments. Do you not see the item added to the end of the &lt;BR /&gt;
Tools menu in all environments? Perhaps you are running into some 'first &lt;BR /&gt;
time' related issues and the code in your 'If FirstTime = True' block is not &lt;BR /&gt;
being executed?&lt;BR /&gt;
&lt;BR /&gt;
&amp;lt;&lt;ALSO&gt;
(for&lt;BR /&gt;
example right above Add-in or Macros...)&amp;gt;&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
You need to use the second argument in the CommandBarControls.AddPopup &lt;BR /&gt;
method. The argument requires the index of the control before which to add &lt;BR /&gt;
the new control. For instance, if you want to add your control before the &lt;BR /&gt;
"Add-Ins..." item:&lt;BR /&gt;
&lt;BR /&gt;
Dim oMenuPopupCmdBar As CommandBar&lt;BR /&gt;
Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AppToolsMenu")&lt;BR /&gt;
&lt;BR /&gt;
'Get the "Add-Ins" control using its internal name&lt;BR /&gt;
Dim oAddInsControl As CommandBarControl&lt;BR /&gt;
Set oAddInsControl = oMenuPopupCmdBar.Controls.Item("AppAddInManagerCmd")&lt;BR /&gt;
&lt;BR /&gt;
'Add the new item before the Add-Ins control&lt;BR /&gt;
Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar, oAddInsControl.index)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Sanjay-&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"Sean Dotson" &lt;MOC.NOSTOD&gt; wrote in message &lt;BR /&gt;
news:5235271@discussion.autodesk.com...&lt;BR /&gt;
I have an addin that should show up in several environments but it only&lt;BR /&gt;
seems to show up in the part environment..&lt;BR /&gt;
&lt;BR /&gt;
Also, how do you position the menu item at the same level in each menu (for&lt;BR /&gt;
example right above Add-in or Macros...)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
If FirstTime = True Then&lt;BR /&gt;
&lt;BR /&gt;
    'create a new toolbar&lt;BR /&gt;
    'Dim oCommandBarAutoSaveDWF As CommandBar&lt;BR /&gt;
    'Set oCommandBarAutoSaveDWF =&lt;BR /&gt;
oApp.UserInterfaceManager.CommandBars.Add("AutoSaveDWF", _&lt;BR /&gt;
        "AutoSaveDWFToolbarIntName", ,&lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    'add the buttons to the toolbar&lt;BR /&gt;
    'oCommandBarAutoSaveDWF.Controls.AddButton oButtonDefAutoSaveDWF&lt;BR /&gt;
&lt;BR /&gt;
    ' Find the command bar of the "Tools" pop-up menu.&lt;BR /&gt;
    Dim oUIManager As UserInterfaceManager&lt;BR /&gt;
    Set oUIManager = oApp.UserInterfaceManager&lt;BR /&gt;
    ' Create a command bar of a pop-up type for a flyout.&lt;BR /&gt;
    Dim oFlyOutCmdBar As CommandBar&lt;BR /&gt;
    Set oFlyOutCmdBar = oUIManager.CommandBars.Add("AutoDWF", _&lt;BR /&gt;
           "FlyoutCmdBar", kPopUpCommandBar,&lt;BR /&gt;
"{D2D356B7-DF5D-4E09-8536-B3190036E869}")&lt;BR /&gt;
&lt;BR /&gt;
    ' Add 1 button to the fly-out command bar.&lt;BR /&gt;
    Call oFlyOutCmdBar.Controls.AddButton(moShadyBobUtilBar2)&lt;BR /&gt;
&lt;BR /&gt;
    Dim oMenuPopupCmdBar As CommandBar&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AppToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("AssemblyToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar =&lt;BR /&gt;
oUIManager.CommandBars.Item("DrawingMangerToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("NotebookToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar =&lt;BR /&gt;
oUIManager.CommandBars.Item("PartFeatureToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar = oUIManager.CommandBars.Item("PartToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
    Set oMenuPopupCmdBar =&lt;BR /&gt;
oUIManager.CommandBars.Item("PresentationToolsMenu")&lt;BR /&gt;
    ' Add the fly-out to the menu pop-up.&lt;BR /&gt;
    Call oMenuPopupCmdBar.Controls.AddPopup(oFlyOutCmdBar)&lt;BR /&gt;
&lt;BR /&gt;
End If&lt;BR /&gt;
&lt;BR /&gt;
Thanks, -Sean&lt;/MOC.NOSTOD&gt;&lt;/ALSO&gt;&lt;/I&gt;</description>
      <pubDate>Wed, 12 Jul 2006 23:47:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703011#M158596</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-12T23:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Menu Item not showing up in environemnts</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703012#M158597</link>
      <description>Thanks Sanjay.  Well it appears the issue was just in R9.  It does work in &lt;BR /&gt;
R10 &amp;amp;11 (who cares about 9 right?)&lt;BR /&gt;
&lt;BR /&gt;
-- &lt;BR /&gt;
Sean Dotson, PE&lt;BR /&gt;
RND Automation &amp;amp; Engineering&lt;BR /&gt;
www.RNDautomation.com&lt;BR /&gt;
www.mcadforums.com</description>
      <pubDate>Thu, 13 Jul 2006 01:08:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/menu-item-not-showing-up-in-environemnts/m-p/1703012#M158597</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2006-07-13T01:08:12Z</dc:date>
    </item>
  </channel>
</rss>

