From the course: Dynamo for Revit: Python Scripting

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Importing the Dynamo library

Importing the Dynamo library

- [Narrator] Now let's have a look at how dot notation can be used to access Dynamo objects. As we would use them in the Dynamo graph. Let's open up a new Python script node. A quick way to do this, is by clicking the right mouse button on the Dynamo canvas and searching for Python, then hitting enter. Perfect. We briefly touched on the imports section in an earlier video. On lines two, three, and four, the default Python script automatically imports clr and from the clr class, we're using the add reference method with proto geometry as the parameter. Followed by from auto desk dot design script dot geometry import star. Later in the course, we will be looking at importing in more data. For now, all we need to understand is that these three lines are importing the geometry library that is shown within the Dynamo geometry menu. With this library, comes with the classes that we can use to make points, curves, cubes, and other geometric objects. Think of this as importing a recipe book…

Contents