Boost Your BIM has been posting some awesome stuff. One older post shows you how to quickly purge your Revit model of Imports: a FilteredElementCollector, a bit of LINQ, a transaction, and Document.Delete to get the imports (but not the links) out of the model.
This little utility is VERY basic. It can basically can record mouse movement and clicks, and keyboard input. You can record a task, save it to a file, open an existing recording, and play. There are some basic options to do with ‘Play Speed’ and number of repeats.
It can even save your recorded macro as an EXE file – however: There are pros and cons in saving the macro in .rec file or compiling it to an .exe file. Once compiled into an EXE file, you can run the macro without TinyTask. However, the play speed and repeat count/continuous playback option are hardcoded during compilation and can no longer be changed. If you save it into a .rec file, it requires TinyTask to run but you can set the play speed and repeat count/continuous playback.