Dynamo Definition to Python or VB based Revit macro / app?


Hi all;

Off the back of RTC Europe and Autodesk University, I’ve started learning more about Dynamo definitions which I’ve tinkered with in the past. I’m particularly interested in the development of it in everybody use. I can see it having a lot of good application in interoperability workflows between platforms, such as Revit and Navisworks, for IFC interfacing and for data management.

I’ve being working on a definition that takes BS1192 (UK British Standard) containers and concatenates them together into a single string. Simple enough. I blogged about my efforts here, https://bimimplementation.wordpress.com/ if you are interested. It explains the project in a bit more content. My good friend, David Wood, a fellow MRUG committee member, whom I’m sure many of you know then refined the definition which I also posted on the same blog.

So my question: With efforts like this is that its very difficult to distribute them. Well at least I think it is. Does anybody know a way of compiling a Dynamo definition to Python code to run as a macro in Revit, or even VB to run as an API app? I suspect the later is not possible, however I assume from the packages that Dynamo is essentially written in Python code, so shouldn’t we be able able to see the “source” behind the definition?

I appreciate any help.


I think the nodes in Dynamo are actually C#, so no luck there. However it seems that Autodesk has a prototype up and running for implementing dynamo scripts directly in families, as shown by Zach Kron here: http://m.youtube.com/watch?v=1eu-1HzMb7U


robert, in my eyes it is a good approach to manually transcript a dynamo definition to python. the advantages are obvious: more usability for less expirienced users and more flexibility in tems of user interface. only disadvantage: far more coding required. but creating a “standard tool” like pas 1192 implementation, i am sure it pays for itself



From what I’ve read and understood, Dynamo is written in C# and F# and uses IronPython(again built on top of C#), which unlike python do not have a built in interpreter and thus need to be compiled before use. That could present a big challenge for any conversion attempts, because you’d first need to de-compile every single node and method.

So far custom nodes and the package manager have worked great for me. Have you given that a try?


Jostein Olsen, thank you posting the link to the video. Very interesting. I would love to get my hands on that Manage Family Scripts add-in as on the face of it that does appear to be a partial solution that Zach has come up with. Is it available anywhere?


Peter Kompolschek, thank you for your advice on this. Dynamo obviously does an excellent job of making automation available to the masses through its visual programming style based around nodes. On the back of the RTC and AU events, there is now a big increase in interest in it. Many, like myself cannot code. Its an eventual goal of mine.

I understand the principles of using the Dynamo definition to test and to then use as a guide for API development, that’s a sound workflow, but for many this will not be accessible. That’s why a methodology of distribution of Dynamo definitions to implement within teams would be very welcome in my opinion. It sounds however from Dimitar Venkov’s post that the technical challenges to allowing people to use Dynamo to create a functional specification and then compile to a user facing application maybe more substantial than I’d have hoped.


Dimitar Venkov, thank you for your reply. I’m quite a new user. I’ve used the Package Search built within Dynamo to add functionality like that contained in Clockwork, however I don’t see how these would help in terms of compiling a Dynamo definition for distribution. Could you explain more?

Many thanks;


Well what I had in mind was something along the lines of the following scenario:

Once you have finished your workflow, you’ll usually be faced with multiple nodes, inputs and a criss-cross of squiggly lines connecting them. That can definitely look very menacing to a newcomer. What you could do to remedy that, is to select all the “meat” of your definition and convert it to a custom node, leaving out just the variable inputs. That way our new user will be faced with a single neat magical box that takes his inputs and spits out the desired result.

Something along the lines of this:



The content of the custom node can be infinitely complex. However the end use doesn’t need to delve that deep as long as when he presses run, the expected result appears on the screen:


Hope that clears it up.


No, I don’t think it’s available. As for distibution of Dynamo definitions I think what Dimitar ment was that when you make a package it’s easier in use for someone else. Instead of a punch bowl of spaghetti, you get a tea spoon of spaghetti, if you know what I mean. :wink:

But all users will have to have Dynamo installed and a minimum knowledge of Dynamo to make it work. As it extends the use of Revit quite a lot, I personally think that all Revit power users should learn Dynamo. At least to some extent.

*EDIT: and Dimitar have already posted I see! :slight_smile: