Revit version and pyrevit

I utilise pyRevit with a custom tab to run some dynamo graphs or python scripts.
With Revit 2025 I’ve had to update some these to suit, these are saved in a Revit 2025 specific location.
Due to Revit 2025 these graphs/scripts no longer run on Revit 2022.
So my dilemma is how to run the correct graph/script from the pyRevit custom tab…
Is there a away to have specific pyRevit_Config.ini files for each Revit version ?
I could have a specific button for each version, but as we all know someone is bound to click the wrong one.

Any help would be appreciated.

Thanks

Hi Eddie,
you could use the bundle.yaml:

# minimium supported Revit version
min_revit_version: 2015

# maximum supported Revit version
max_revit_version: 2018

I cannot think about a more elegant way to do it.

  • Thinking out loud with what you have at your disposal: doing a different extension per version + the bundle directives :point_up: maybe
  • or leveraging the startup script to activate/deactivate folders or your extension depending on the revit version (it could rename one section of the folders of your extension to make it undetectable by pyrevit depending on the version)