Revit Python Shell, update to Revit 2025, Revit .NET API

will def have a look

1 Like

Just came across this thread and thought I should mention that you don’t have to restart pyRevit on library changes. Just hold down Ctrl + Alt + Shift + click on your button. My workflow got so much faster once I figured this out.

Here’s the documentation: Button Click Modes - Notion

CTRL-ALT-SHIFT-Click: Reload Engine

IronPython and CPython Scripts

Cleans up all the cached engines for a fresh start.

3 Likes

So cool, there are many more useful options as well!
Thanks for pointing it out :raised_hands:
I am definitely going to use it all the time from now on, wish I knew about that much earlier :grinning:

2 Likes

hunk… i never reload my pyrevit when programming my vscode is set to autosave.
i make a change and a push the button and the script runs in the adjust version in a sec…

i don’t get the hastle about this.
you only need to reload is you make UI change or more, delete, replace fodler or files in the extension.

or do i have magic hands?

Hi @AlexanderVDB !
We are talking about the case when you are using custom lib modules. Whenever you are changing a component(s) of lib, the changes are not being applied automatically (even if you save source files) and in order to do this you either should reload pyRevit or as @onomou pointed out, click button with pressed combination of buttons to reload all dependent custom libs.

1 Like

@romangolev Do you mean custom lilbs under ToolName.exstension/lib ?
because those also adjsut asap for me.

Or are we speaking about modules that are loaded from outside the extension?
Because if that is the cause iw ould be intrested to know how you even do that :smiley:!
have been looking for a way for ages it seems and can’t seem to find something that works for me and be able to depoy it as well.

1 Like

@AlexanderVDB, sorry for a long lag.
There are 2 options in pyRevit you can hook up your lib.
First one is just to put under extension folder, like you mentioned with ToolName.exstension/lib. This is going to be a library that would be accessible only within the extension it’s being put.
Another type is a Library Extension which is a special extension which is a library itself. In the scope of extensions it’s going to look like this: MyAwesomeLib.lib and it should be put on the same level as ToolName.exstension. This way the it’s going to be accessible across other extensions and will be loaded as a separate extension on the startup.

1 Like

Just came across this thread, interesting things
Would add, that you don’t even have to ctrl+shift+click every time to reload the libs, just add engine:clean:true to your bundle file, and it reloads at every run. I do it with my test/playground script buttons.

1 Like