Dynamo-Revit Parallel Task/ Multithreads?

Hello !

I read everywhere that it’s not possible to develop an API running in the same time that Revit.
But Dynamo and Revit are working as parallele task, communicating together …

So I’m asking myself, how it’s possible ?

A multithread process is existing ?

Thank you for your help !

Both Dynamo and Revit are predominantly single-threaded (with a few exceptions) because memory management is tricky stuff.

Dynamo works in something called the “idling event”, i.e. only when revit is not doing anything.

It might be a good idea to post what you’ve read because it’s hard to figure out what your question is.

Hi Dimitar,

Thanks for your answer here, it helped with a question I had.

I was hoping I could clarify something on the same topic.

Say for example I had a python script within dynamo that was setup to multiprocess the creation of Revit sheets, am I right in thinking that even though my python script is multi-threading I am bottlenecked by Revit’s single threading? Thus making the actual Revit process of bulk sheet creation no faster than it would be using a script thats not multiprocessed?

Apologies in advance, my understanding of this is quite rudimental

Cheers, Pete

Hi Pete,

I’m sure you know more than me about it :slight_smile: But here’s a bit of discussion you might find interesting …

As I understand it, you can code whatever you want, and the code can force Revit to multi-thread… But it is extremely likely to cause a fail because Revit’s processes are very difficult to run multi-threaded and are not officially supported.

That said, this example manages it, though with big caveats :slight_smile:

Hope that’s useful!


Thats very useful! Thanks very much Mark

Holy smokes! Awesome share @Mark.Ackerley

If I’m not mistaken, @Dimitar_Venkov has some sort of multi thread implementation here, https://github.com/dimven/SpringNodes/blob/master/py/Mesh.ToPolySurface.py

1 Like