Import Python Code to Dynamo

Dear community,
as part of my bachelor thesis i have programmed a parametric building in python.
I, more or less, just started using Revit and Dynamo.
I want to pass the parameters of the building (e.g. building length/ width), which is the output of my “Python code”, to dynamo.

I read alot about importing it with XML/ CSV, but didn’t find a current solution on how to do it.

What type of data format do you guys recomment and most important, do I need packages?
What is the most common way to import Python code?

I am using Revit 2021.1.2

Thank you!

Hello…could you share your python code ?

I wrote you a personal message.

cheers…have you tried to play around with some of these here…

No, because I want to convert the pyhton code to XML or any simular data format.
The aim is to get a hierarchical structure to make it easy to “read” the code
After that I want to import the choosen data format to dynamo.

Does this make sense to you?
What data format do you recomment?

it sounds like you should read about abstract syntax trees,parse trees, expression trees etc

1 Like