Using different extensions with different release/Revit pairings

Using 4.8 attached to R24 and 5.0 with R25, we need a different custom extension associated with each pairing, but when we set the extension path for one of them, the other follows suit . . . It seems the extension paths are stored in the same place for both versions? Is there a workaround for this?

Out of the box, nope.
But do you still need 4.8?

Not if we can’t run different extensions on each version, that was kind of the point. We have upgraded tools and families that we want to introduce with R25, getting a clean break between Revit versions since a number of our upgrades aren’t backwards compatible with projects started in R24 and associated revit template with different families, schedules, etc.

Users need to close out jobs started in R24 with the original tool suite, all while starting new projects in R25+. If we must have both toolsets loading in the ribbon for both R24 and R25 during the transition period, there will be confusion. If there’s no way to keep the extensions relegated to different Revit versions, there’s no sense in getting users set up with 2 versions of pyRevit.

You should look into the max/min version:

Supported Revit Versions

Bundle file can define the range of Revit versions that support the bundle. pyRevit will not load the bundle if it is not supported under the running Revit. In the example below, the bundle will be loaded with Revit 2015 up to 2018 and is expected to work with the APIs for these versions.

# minimium supported Revit version
min_revit_version: 2015

# maximum supported Revit version
max_revit_version: 2018

If that does not work, could you make two extensions?
One for >R2025 and one for R2025 and up.
Name them CompanyExtension and CompanyExtension2025 or similar?
Not ideal, but could work.

2 Likes

Two extensions is exactly what we’re dealing with right now. The problem is that when we choose the extension path or paths we want from within 4.8 attached to R24, it shows up unannounced in 5.0 attached to R25 where we want a different set of tools. Max/Min seems worth exploring, thanks!

@Jean-Marc or @Jonn.O - Any idea what I might be doing wrong? With 5.0 attached to both R24 and R25 and this in the bundle.yaml of the extension (I’ve tried it in the .tab folder and .extension folder yaml’s) the extension and tools are still loading into R25.

It needs to be in the bundle.yaml file for the .pushbutton-folder, I think. ( @Jean-Marc correct me if I’m wrong, I’m not at the PC right now.)

The button should then only be loaded in R2023 and R2024, not in R2025.

1 Like

Indeed
At the pushbutton level.

And

If I actually plug that into the yaml for every tool in the extension (there are many) will the tab then not show up for '25, or should I expect to get an empty ribbon? Trying to picture the end result before going to those lengths.

Had to test it, as I did not know.
Looks like the tab and panels are loaded, but empty (no pushbuttons or pulldows/stacks etc.)

1 Like

Well, better than having tools available that can crash Revit. Thanks for your help!

You could have both versions in the same extensions/tab/panel/

  • button for v23.pushbutton
  • button for v26.pushbutton
1 Like

I thought of that as soon as I learned about the max/min, but we’ve combined some tools and relocated others, so it’s not really practical for this next-gen release. Would be nice if we could use the max/min just once in a yaml within the .extension folder and be done with it.