I’m doing some telemetry and I wish to add some basic information to the data being sent for each script that is being run to help me diagnose error reports more accurately.
I want to add a version of my toolset to every script run’s telemetry data.
So right now I’d have to call a function in each of my scripts that basically does this:
pyrevit.script.get_results().tools_version = "1.0.10"
EDIT: Just to clarify, I am not hard-coding the version in each and every script. This is an example.
With over 50 scripts and counting I expect it to become a real hastle to update this, or to always have to add a call to this function for every single created script.
Lazy as I am I’d love it if it were possible to have this bit of code be run every time a script is fired, without having to resort to making my own repository.