Hello everyone!
I want to automatically update my active non-modal WPF form every time, for example, I change the active view. At the moment I need to create a button and press it manually
Is it possible to achieve such an automatic refresh with pyrevit?
@DmytroSE This is great thanks for sharing here. The @revit.events.handle() decorator was something I started a while ago as a way of tying a python function to Revit handlers. I have only implemented these 4 events but more could also be added to revit/events.py module
@eirannejad I found a little issue. When I run the WPF form with a smartbutton eventhandler(revit document opened) the @revit.events.handle() decorator is not working. Need to re-open my script manually
Here is a link:
Thanks for the example @DmytroSE , looks like it works for me too.
I’ve got some followup questions though.
Is it normal that the window_closing function doesn’t output anything when I put a print statement in there? I wanted to check if it was called. Didn’t do anything
What software do you use to design you xaml files? Right now I’m using VS, but I’m looking into a free opensource replacement.