When running Revitpythonshell or running a python script with XAML gui I am unable to work in Revit until closing Revitpythonshell or the python gui.
Is there a way to keep Revit from becoming inaccessible like this?
I would like to keep my script open to continually use while I work.
You have a couple of options here depending on what your script is trying to do:
threading
module could be what youre looking for. You can automate alot of tasks in the background as you continue working, with one big caveat: Revit is a single-core program, so if you touch the database / API from another thread - Revit will crash.winforms
or another UI tool to let you know where the thread is up to. I use this to automate non-Database tasks that take 30-45 mins, while continuing to work in Revit.ExternalEvent
in Revit. Here is a fantastic example of using a form withExternalEvent
by Cyril Waechter: pyRevit WPF non-modal trouble