AU Class
AU Class
class - AU

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

Share this class
Search for keywords in videos, presentation slides and handouts:

    Description

    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.

    Key Learnings

    • Understand how Python interacts with Dynamo and External Resources.
    • Explore fundamentals such as Syntax, Looping, Object Types and Casting.
    • Discover the limitations of the Python node: Lists, help prompts and false-positives.
    • Learn how to access the Revit API for functionality beyond out-of-the-box Dynamo.

    Downloads