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
From the course: Dynamo for Revit: Python Scripting
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Collecting elements3m 22s
-
(Locked)
Creating a collector7m 14s
-
(Locked)
Getting Revit parameters5m 51s
-
(Locked)
Setting Revit parameters6m 24s
-
Creating line-driven elements5m 34s
-
(Locked)
Element locations3m 25s
-
(Locked)
Adjusting elements5m 13s
-
(Locked)
Creating a view4m 6s
-
(Locked)
View bounding boxes7m 25s
-
(Locked)
Revit API and IronPython types7m 18s
-
(Locked)
-