i created a script that works just as intended. It is saved in this folder path. When i start up Revit, the script is up and running. However, I’d like to be able to turn it have it turn on/off.
This is the first hook i created that did not use a pushbutton and I guess it is intended to run in the background.
If i wanted to create more hooks, what would be the right folder structure. I can’t have multiple “hooks” folders since file explorer won’t let me.
I think pyrevit may only register a single UpdaterId thats hard coded. You might be able to prefix the name like xxxx_doc-updater.py to get around the naming issue. It works that way with script.py and config.py so it worth a shot I guess but it may not be possible.
If you are planning on using multiple/complex updaters I highly recommend using C# instead. I’ve run into a few strange bugs and limitations, but its fine for learning and simple tasks.
You can create ribbon buttons with on/off image to indicate the status when you enable/disable the updaters. I have not done this myself using pyrevit updater, only using C#.
Here’s a head start with the toggle image for the button. The PostCommand in my example is executing an external command in a dll to enable/disable, but you should be able to do in python as well.