Changing the default Tab Coloring

Hi all, just after a bit of python help really.
I’m in the process of making a custom extension to compile a load of useful dynamo scripts my practice use into a convenient place, and a few users really like the pyRevit Tab Coloring tool, so I’m going to pop a copy into the extension.
However, I’ve had a couple of requests to make the tool default to the Background Fill style, as opposed to the Border - Light.
My python knowledge is quite limited, so could someone please point me in the direction of how I would go about editing a copy of the script to behave like this?
Since it’s already an option within the tool, I don’t imagine it would be too difficult to change the default?

Hi Dan
You would have to go a different way than a pushbutton.
What you would want is to propagate the setting to your team
The setttings are stored in the pyRevit_config.ini file under %appdata%/pyRevit

  1. You would need to create a seed of the settings file
  2. setup a routine to push this seed to others: cmd line, powershell script, startup script that runs a cmd line, …

for reference:

the settings section for tab coloring looks like this on my install:

[tabcoloring]
sort_colorize_docs = false
tabstyle_index = 8
family_tabstyle_index = 6
tab_colors = ["#FFF39C12","#FF2C3E50","#FF0000FF","#FF8B4513","#FFFFD700","#FF00CED1","#FFFF4500","#FF00FFFF","#FF9ACD32","#FFFF1493"]
tab_filtercolors = {}

Thanks, before I go pushing to others I want to get it working as desired on my machine!
In terms of creating a seed file, is that as simple as copy-pasting with the settings changed as your configuration for example? I tried editing the config file in appdata but I didn’t see any updates, perhaps I was approaching it the wrong way.

  • Yes
  • config file is read at startup of Revit.
    You need to restart Revit or reload (but depending on what you change it does not always do the trick)