Skip to content

Diving Deeper: A Beginners look at Python in Dynamo

Sol Amour edited this page Aug 13, 2018 · 1 revision

Diving Deeper: A Beginner's Look at Python in Dynamo

This is an upload of the Handout for Sol Amour's Python laboratory at AU London 2018

This lab will explain the process of accessing Python inside of Dynamo, a powerful way to talk to the Revit API and allow for greater degrees of functionality that out-of-the-box Dynamo and community driven packages may lack. It will cover the core basics of the Python language such as syntax, what the IDE colours mean, how and when to indent (And what it means if you don't), what object types are and how to cast them to another type as well as covering looping? one of the most powerful features that Python has available. It will discuss the potential pitfalls that you run into when accessing Python from Dynamo such as data typologies and wrapping, before diving deeper into external resources: How to access the contents of an external .dll, how Dynamo specifically talks to external and internal resources, how we can retain a 'lightness of touch' by only importing targeted methods before looking at how we interaction with the Revit document through transactions and specific Dynamo casts. It will cover the limitations of the Python Node in Dynamo, such as list interaction and a lack of a real intellisense, before working through a couple of examples of Revit API calls that are not present in out-of-the-box Dynamo.

Handout