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.
Anyone's help would be appreciated.Thanks in advance.
Working on Inventor 2014 with Visual Studio 2010.
Regards
NKalyan
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