Dynamo 2.0 Python API

python

#1

Hi!

I have been looking around for a API for the Python node but can’t seem to find one, at least not via the services of Google.

Last time someone asked for this seems to be 2017. Is anyone aware of a systematic description of the classes available from within a Python node?

/Mahir


#2

Hi :slight_smile:

Here’s IronPython 2.7 documentation, i’m guessing you are talking about this.

https://docs.python.org/2.7/


#3

Thanks for your quick reply!

No, I mean the interfaces to the objects in Dynamo.


#4

I think what you are looking for is intellisense for python’s designscript. Search the forums for “intellisense”, though I think that requires you to use IDEs like visual studio.

As for an actual API, I am pretty sure any nodes you can use in a code block can be called the same way with Python, so you would need to find DesignScript class info. Nodes like string from object are not able in code form so python cannot do it either.


#5

Ok. Now I see. There is no reference manual gathering all the available modules. Instead, I have to go to

C:\Program Files\Dynamo\Dynamo Core\2

To see what dll’s there are and figure out which reference to add and which namespace to import there.

References to the classes are obtained by looking in nodes and code blocks.

Thats fine enough. Thanks a lot!

/Mahir


#6

This explains majority of what you will need to know about Dynamo and Revit interfaces.


#7

Thank you. This is very helpful!