🍾 New C# Loader for pyRevit in WIP

Hi all,

@romangolev has undertaken a significant effort to port the Python loader of pyRevit to C#. (The loader parses Python code and converts it into C# code that Revit can execute.) This work has spanned several months and represents one of the largest individual contributions to the codebase apart from Ehsan’s.

We’re now in the testing phase, and we need the community’s help to validate this for the next release. I plan to leave it in WIP for a couple of weeks to gather feedback.

Here’s how you can help:

  1. Install the latest WIP—the new loader is now the default
  2. Report any issues related to loading pyRevit, reloading, UI buttons, etc. here:

Questions are welcome—preferably in the forum. Thanks in advance for your help testing!

6 Likes

I am currently loading this on my system. I’ll let you know if I see anything.

So is this going to help with the transition over to .NET 10? Are there things that you can implement and test now? I am really hoping that this change to .NET 10 isn’t as disruptive of a change to you (and all the other add-ins as well) as the last big leap was. Fingers crossed!

Not related. More of a behind the scene work.
Everybody keeps on telling me the migration will be easier (but nobody does it ;p)
I tried a couple of hours back in November, I did not get through

@Jean-Marc

I’m cloning and fetching the PRs related to the updated C3 Loader issues, can you tell me how can I compile the new code before attaching it to Revit?

In the specific case of the c# loader, you don’t have to compile, just checkout the PR. Roman already included the compiled DLLs.

All instructions are here Developer Guide - pyRevit

Some about the clone, if you already cloned attached the pr branch, you may skip

awesome! thank you, I will attach it and see how it goes.

I have a question although I’m not sure if it’s related to the Loader behavior. I noticed in the current 5.3 version and previous 4.x versions that changes to a bundle.yaml file (for UI layout) weren’t picked up when I hit the reload button on the pyrevit the tab. Is that reload behavior different from the Loader discussed here?

I have been running the latest WIP for a few days. PyRevitLoader seems to take around 14-15 seconds to load, according to the Add-ins Manager.
Otherwise, I have not noticed anything different.

Yep, depends on the amount of buttons and extension + hardware

  • Old loader with basic tools 20-25 sec
  • new one, 10 sec or less in my tests