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.

Adjusting elements

Adjusting elements

- [Narrator] The Revit API offers a few different ways to edit elements, such as copying or rotating elements. To do this, we'll need to access the element transform utils class, so let's give that a try in this video. I currently have the Revit and Dynamo exercise files open for this video, which is where we left off from in the last exercise. So let's start by looking at the element transform utils class in visual studio, so using this class let's try copying and rotating the couch that we moved in the last video. To copy an element, we'll need the document, the element ID for the element to copy, and an XYZ, which is a vector which determines where to copy an element to. The rotate element method takes the document element ID for the element to rotate, a line, which is the axis to rotate the element around, and a rotation angle in radians, which is a double. So let's switch over to Python in the Dynamo file and give these methods a try on the couch element. To copy the couch, we…

Contents