Hello everyone,
I’ve been using Dynamo for a while.
So the next step is the learn more about accessing the Revit API in Python.
But I don’t know how to start.
I have installed the Revit SDK and look in the RevitAPI file but it is so difficult.
Can someone help me with a easy sample? A floor or a wall?
Thanks in advance!
1 Like
@solamour Has put together a comprehensive slide deck addressing exactly this. Also, there’s no need to download the Revit SDK separately unless you plan on writing C# plugins. All access to the Revit API is provided directly within the Python node in Dynamo by importing the common language runtime (clr), adding a reference to ‘RevitAPI’ and importing the desired classes from Autodesk.Revit.DB (or whichever namespace is relevant to what you are doing). If you search for “API” on this forum you’ll find plenty of other examples. Some other code samples can be found here (although they are made for Revit Python Shell and may have to be modified).
4 Likes
The one that helped me kick off python was this course by Jeremy at lynda.com, really good place to start. Link here.
All the best!
1 Like
An alternative to the Revit SDK is @Gui_Talarico’s apidocs.co that contains not only the SDK - but code snippets as well! It’s pretty genius
3 Likes