- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, iam trying to implement a ComboBox into a user defined additional Inventor Ribbon Panel. The ComboBox is shown in the panel with its entries. But iam not able to catch the selected entry when it is clicked.
I implemented the Combobox in the AddinServer Class with
Public WithEvents comboBox1 As ComboBoxDefinition ...... 'Definition ComboBox comboBox1 = AddinGlobal.InventorApp.CommandManager.ControlDefinitions.AddComboBoxDefinition( My.Resources.Browsernamen_wiederherstellen, My.Resources.BrowserNameUpdate, CommandTypesEnum.kQueryOnlyCmdType, 400, Guid.NewGuid().ToString(), "Browsernanmen wiederherstellen", "Stellt den ursprünglichen Display Namen der zugehörigen Datei wieder her", ButtonDisplayEnum.kDisplayTextInLearningMode) comboBox1.AddItem(My.Resources.Alle_Browsernamen_wiederherste) comboBox1.AddItem(My.Resources.selektierte_Browsernamen_wiede) comboBox1.AddItem("ComboBoxItem #3") comboBox1.DescriptionText = My.Resources.Browsernamen_wieder_herstellen comboBox1.ListIndex = 2 ......... 'Add it to the Browser Panel 'Buttons in Ribbon Panel Browser hinzufügen (Tab "Browser") AddinGlobal.RibbonPanel3DCSBrowserId = "{D2554A9F-2EEB-477B-A469-D40FBE606866}" 'MLHIDE AddinGlobal.RibbonPanel3DCSBrowser = tabBrowser.RibbonPanels.Add(My.Resources.Browser_Panel, "GeneralTools_3DCS_AddIn.RibbonPanel_" & Guid.NewGuid().ToString(), AddinGlobal.RibbonPanel3DCSBrowserId, String.Empty, True) 'MLHIDE Dim cmdCtrlsBrowser As CommandControls = AddinGlobal.RibbonPanel3DCSBrowser.CommandControls cmdCtrlsBrowser.AddComboBox(comboBox1)
When i try to sent the OnSelect Event from AddIn class to my class ButtonActions i couldn't catch the NameValueMap
AddHandler comboBox1.OnSelect, AddressOf ButtonActions.ComboBox1_Execute3
With Buttons it works fine but there is no NameValueMap, for example:
buttonPart5.Execute = AddressOf ButtonActions.buttonPart5_Execute
Did anyone has an idea in which way i have to handle the OnSelect event and receiving the selected Index of the ComboBox from the NameValueMap?
Martin Winkler
CAD Developer
Did you find this post helpful? Feel free to like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
Solved! Go to Solution.