03‐ Ribbon design - EKl40/FreeCAD-Ribbon GitHub Wiki

When clicking on the button "Ribbon Design" in the Application menu, a Ribbon Design dialog will show up.
Please be aware that in order to get all the commands per toolbar and per workbench, all workbenches need to be loaded. This will result in a loading time of the menu. It can take a minute or two.

The dialog will modify the "RibbonStructure.json" file which is used to store the design of the ribbon UI.

The UI

The Ui is divided in 4 main sections:

  • The tab bar
  • Reset and restore buttons
  • Dialog buttons
  • Help button

Tab bar
With the tab bar you can select the different tabs

Reset and restore buttons
The restore button is used to restore the current "RibbonStructure.json" to a previous version. For this the backup function needs to be enabled. With the reset button you can reset the ribbon to the initial design. For this the file "RibbonStructure_default.json" is used. See chapter "Scripts"on how to create your own "RibbonStructure_default.json" file.

Dialog buttons
The update button updates the "RibbonStructure.json" without closing the dialog.
The cancel button closes the dialog without updating "RibbonStructure.json".
The close button updates the "RibbonStructure.json" and closes the dialog. When changes are made, a dialog will be shown to ask you to restart FreeCAD.
This is the same dialog used with the addon manager.

Help button
This button opens the home page of this wiki in your default browser.

The quick access toolbar

Filter area The filter area can be used to shorten the list of commands. This can be helpful when searching for a command.

Add commands to the quick access toolbar
On the left you will see all commands with an icon that are present in FreeCAD. You can select multiple commands and add them to the list on the right by clicking on the right arrow. If you select a command on the list on the right and click on the left arrow, you remove the command from the quick access toolbar.
You can sort the commands on the quick access toolbar by select a command and click on the up and down arrows.

Exclude panels

It is important to understand that all panels are based on FreeCAD toolbars. (Except for custom panels) This tab will show a list of toolbars which can be excluded from being used to create panels for the ribbon.

Filter area
The filter area can be used to shorten the list of toolbars. This can be helpful when searching for a command.

Exclude panels
You can exclude panels by selecting one or more toolbars from the list on the left.
Click on the right arrow, to exclude the selected toolbar(s). Select an excluded toolbar and click on the left arrow, to include the toolbar again.

Include workbenches

Include workbenches
You can include workbenches by selecting one or more workbenches from the list on the left. Click on the right arrow, to include the selected workbench(s). Select an included workbench and click on the left arrow, to exclude the workbench again.

Create custom panels

You can create your own custom panels based on one or more toolbars. This can be useful when a workbench has a few very short toolbars or when a toolbar has a really long name.
Panels are workbench specific. It is not possible to mix toolbars from different workbenches into one panel. However, custom made toolbars are included. So you can create a custom toolbar with the normal FreeCAD toolbar UI. This toolbar is then also included in the ribbon as a panel.

Create a custom panel
To create a custom panel, take the following steps:

  1. In the top dropdown select "new". The left and right list will be cleared.
  2. Select a workbench in the second dropdown. On the left the toolbars of this workbench well be shown.
  3. Now select one or more toolbars and click on the arrow pointing to the right. On the right all the commands of these toolbar will be shown.
  4. On the right you can select a command and use the up/down arrows to change the position of the command. (This can also be done in the Ribbon design tab)
  5. In the input box, enter a name for your panel. Click on the "add" button to add your custom panel. The toolbars which are replaced by this custom toolbar will not be used by the ribbon.

remove a custom panel
You can remove a custom panel, by selecting it in the top dropdown and click on the "remove" button.

Ribbon design

Here you can design your ribbon for each workbench that you have installed. On the left part of the dialog, you can change per panel the following:

  • Set the size of the command button to small, medium or large
  • Change the text for the command
  • change the position of the command
  • add separators to organize your commands

On the right part of the dialog, you can change the order of the panels. When selecting a toolbar in the second dropdown, you can also check "Icon only". This toolbar/panel will then show commands with icons only. despite what setting is set in the preference dialog.
Important to understand is that is function is based on the name of the toolbar/panel. This means that a panel with the same name in another workbench will also show commands with icons only.

⚠️ **GitHub.com Fallback** ⚠️