Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

2 REPLIES 2
Reply
Message 1 of 3
naresh_kalyan
1604 Views, 2 Replies

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

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

 

2 REPLIES 2
Message 2 of 3
jneutze_bwv
in reply to: naresh_kalyan

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
in reply to: jneutze_bwv

jneutze bwv

Yes, I got it. Thank you very much. 

 

Regards

NKalyan

 

 



 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report