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: 

.Net Add-In fails to add a ribbonbutton on a German Inventor-version.

0 REPLIES 0
Reply
Message 1 of 1
patrikpålsson1032
261 Views, 0 Replies

.Net Add-In fails to add a ribbonbutton on a German Inventor-version.

My first thought was that the code was unable to find the correct ribbonpanel because of a different name in other inventor-version. For ex. oApp.UserInterfaceManager.Ribbons("Assembly").RibbonTabs("id_TabTube_Pipe_Run").RibbonPanels("id_PanelA_TubePipeRunManage") that is a working panel-object on English versions maybe had other names (those in ""-marks) on German versions.

 

So I wrote some scan code that iterated thru the ribbons to get the german names:

 

For Each R In oApp.UserInterfaceManager.Ribbons
AddLineToTextFile(My.Application.Info.DirectoryPath & "\Ribbon.txt", "Ribbon InternalName:" & R.InternalName)
For Each RT In R.RibbonTabs
AddLineToTextFile(My.Application.Info.DirectoryPath & "\Ribbon.txt", "    RibbonTab DisplayName:" & RT.DisplayName & "    Internal Name:" & RT.InternalName)
For Each RP In RT.RibbonPanels
AddLineToTextFile(My.Application.Info.DirectoryPath & "\Ribbon.txt", "    RibbonPanels DisplayName:" & RP.DisplayName & "    Internal Name:" & RP.InternalName)
For Each CC In RP.CommandControls
AddLineToTextFile(My.Application.Info.DirectoryPath & "\Ribbon.txt", "    CommandControls DisplayName:" & CC.DisplayName & "    Internal Name:" & CC.InternalName)
Next
Next
Next
Next

The problem was that the collection "oApp.UserInterfaceManager.Ribbons" on a german version was empty.

The scan on an English version worked perfectly.

 

Does anyone have a clue why the collection on a german version is empty or how to create buttons that adapts to different Inventor-language-versions.

0 REPLIES 0

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

Post to forums  

Autodesk Design & Make Report