PyRevit folder structure part 2
Let's look at the pyrevit tab and how all the scripts are sorted. For example, I'll take the 'Drawing Set' panel:
Here we have 3 drop-down menus (3D, Sheet, Edit), which contain other buttons, then again 3 drop-down menus, located vertically, and 2 buttons (Manage Keynotes, Print Sheets).
1. Drop-down menu
To create a drop-down menu you need a folder with '.pulldown' in the name and put all .pushbuttons folders there:
icon.png is an icon of drop-down menu, bundle.yaml file pyrevit uses for sorting buttons in a specific order. Just open it with a text-editor and sort your scripts as you wish:
To create a separation line type '-----' in the .yaml file.
2. Stack panel
To sort the buttons vertically you need to put your scipts to a folder with '.stack' in the name:
Here the author combines methods. The stack panel is created first, then put all the drop-down menus there, and all the pushbuttons are in the drop-down folders. You can have 2 or 3 stacked elements.