Inventor Add-in ribbon for "Part", "Assembly and "Drawing" documents

Inventor Add-in ribbon for "Part", "Assembly and "Drawing" documents

naresh_kalyan
Advocate Advocate
1,771 Views
2 Replies
Message 1 of 3

Inventor Add-in ribbon for "Part", "Assembly and "Drawing" documents

naresh_kalyan
Advocate
Advocate

Hi everyone,

I'm trying to create an Add-in which support Part, Assembly and drawing as well. Upon placement of .dll file in \INSTALLDIR\bin\ and .addin file in publicdocuements, the icon (Ribbon item) should be visible for all documents i.e. Part, Assembly, Drawing.

 

I'm doing with InventorNetAddinWizard taken from the site below mentioned.

 

http://spiderinnet2.typepad.com/blog/2013/08/generate-inventor-2014-vbnet-addin-project-using-invent...

 


Anyone's help would be appreciated.Thanks in advance.

 

 

Working on Inventor 2014 with Visual Studio 2010.

 

 

Regards

NKalyan

 

0 Likes
1,772 Views
2 Replies
Replies (2)
Message 2 of 3

Anonymous
Not applicable

Hi NKalyan,

if I understand correctly you could just instantiate the Button three (or whateve-you-need) times and it is accessible in all three Panels.'

In my Sample-AddIn (don't know the source anymore, sry), you could just do this, e.g.:

' Get the zero doc ribbon.
            Dim zeroRibbon As Inventor.Ribbon = UIManager.Ribbons.Item("ZeroDoc")
            Dim assemblyRibbon As Inventor.Ribbon = UIManager.Ribbons.Item("Assembly")
            Dim partRibbon As Inventor.Ribbon = UIManager.Ribbons.Item("Part")

            ' Get the getting started tab.
            Dim startedTab As Inventor.RibbonTab = zeroRibbon.RibbonTabs.Item("id_GetStarted")
            Dim startedAssemblyTab As Inventor.RibbonTab = assemblyRibbon.RibbonTabs.Item("id_GetStarted")
            Dim startedPartTab As Inventor.RibbonTab = partRibbon.RibbonTabs.Item("id_GetStarted")


            ' Get the new features panel.
            Dim newFeaturesPanel As Inventor.RibbonPanel = startedTab.RibbonPanels.Item("id_Panel_GetStartedWhatsNew")
            Dim newFeaturesAssemblyPanel As Inventor.RibbonPanel = startedAssemblyTab.RibbonPanels.Item("id_Panel_GetStartedWhatsNew")
            Dim newFeaturesPartPanel As Inventor.RibbonPanel = startedPartTab.RibbonPanels.Item("id_Panel_GetStartedWhatsNew")

            ' Add a button to the panel, using the previously created button definition.
            newFeaturesPanel.CommandControls.AddButton(m_buttonDef, True)
            newFeaturesAssemblyPanel.CommandControls.AddButton(m_buttonDef, True)
            newFeaturesPartPanel.CommandControls.AddButton(m_buttonDef, True)


Regards
jneutze

Message 3 of 3

naresh_kalyan
Advocate
Advocate

jneutze bwv

Yes, I got it. Thank you very much. 

 

Regards

NKalyan

 

 



 

0 Likes