How to create pyRevit smartbutton?

pyRevit has a smartbutton builtin. It’s a toggle button to start/stop a script.
color=orange: re-run a script continuesly in the background.
color=black: stops the script

pyrevit smartbutton

How can reproduce/create this for my created scripts?

Hello @mrl …why do you not just ask at the pyrevit forum as you link to ?

2 Likes

In addition to the forums, you can see how all tools are authored by visiting them in the native toolbar files. It’s all there for the user to see.

OK. Thanks

Note that most things like this are not running continuously.
They are event driven. Such as ViewActivated. Running a program continuously is a lot of overhead for a script. Looking at the Revit DB continuously would slow Revit way, way down.

And there is a ton of info over at pyRevit. It rocks.