Months ago I made a custom extension, appearing as its own panel in Revit, with two scripts (each with an icon). After upgrading pyRevit a couple of times, one of those icons/buttons is now greyed out and unclickable. I don’t know exactly when it happened, i.e. what was the trigger that broke things, because I don’t use it as often as the other script, and I always activate the other script with a keyboard shortcut, therefore my extension’s panel is hardly ever open (so I never noticed the greyed-out icon).
I’m not sure how to debug this, since there’s no errors being output. Instead, it’s as if it’s just an icon without a script. Happy for any suggestions on where to start
I have run into similar issues before. give this a shot, may or may not work.
Duplicate the extension so you have a new copy, delete the old one and rename the newly copied one again, and reload (better if you close and restart Revit). This has worked for me in the past. I notice it will grey out on me if i rename the extension, the tab, or the panel every once in a while. IDK why, maybe some cached data lingering around.
Well, it took awhile to get the time to work on this, but I found the problem – it wasn’t the presence (or absence) of a .yaml file, nor was it helped by deleting/renaming the extension. But after an hour of trying all sorts of things that chatgpt suggested, each time moving closer to the solution, the problem was that my system kept things cached that shouldn’t have been.
In a command window I tried pyrevit caches clear --all but that generated errors like this:
Error: Error recursive deleting directory “C:\Users\revitech\AppData\Roaming\pyRevit\2024” | Access to the path ‘C:\Users\revitech\AppData\Roaming\pyRevit\2024\pyRevit_2024_0970b9c2bbd1377c_pyChilizer.dll’ is denied.
So I went to this folder and renamed each of the revit version folders (I had 2024, 2025, and 2026) to disable them (literally ‘disabled2024’, etc.): C:\Users\revitech\AppData\Roaming\pyRevit
… then restarted Revit and the extension wasn’t greyed out anymore!