Message 1 of 3
Custom Panel and Button placement
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to add a panel with one button in the Part environement under the Scetch tab and the same under the Assemble environment under the Assemble tab.
The panel and button in the Part environment is placed at the end in the ribbon, what's normal !
But the panel and bitton in the Assembly environment is placed at the beginning of the ribbon !! Why ??
button1 = inventor.CommandManager.ControlDefinitions.AddButtonDefinition(
"Client Name", "InternalClient Name",
CommandTypesEnum.kSchemaChangeCmdType, GUID,
"DescriptionText", "Sets the ClientName in the\nCompany Property", largeicon1);
button1.OnExecute += onClickButton1;
Ribbon partribbon = inventor.UserInterfaceManager.Ribbons["Part"];
RibbonTab toolsTab1 = partribbon.RibbonTabs["id_TabSketch"];
RibbonPanel newScetchPanel = toolsTab1.RibbonPanels.Add("Drawing Properties", "button1", GUID);
newScetchPanel.CommandControls.AddButton(button1);
Ribbon assemblyribbon = inventor.UserInterfaceManager.Ribbons["Assembly"];
RibbonTab toolsTab2 = assemblyribbon.RibbonTabs["id_TabAssemble"];
RibbonPanel newAssemblyPanel = toolsTab2.RibbonPanels.Add("Drawing Properties", "button2", GUID);
newAssemblyPanel.CommandControls.AddButton(button1);
This is in the Part environment : OK
In the Assembly environment the panel is set at the beginning ????