Accessing the Revit API directly with Python requires geometry and unit conversions between Dynamo and Revit. In this video, Jeremy explains how to convert Dynamo geometry to Revit geometry by importing and utilizing the geometry conversion methods in Python. Jeremy also explains the unit differences between Dynamo and Revit and how to convert between the two.
- When parsing Dynamo geometry…to work with the Revit API, or vice versa,…we need to convert the geometry types…just as we've done with Revit Element Types.…So let's give that a try in this video.…I currently have the Revit exercise file…open for this video.…Along with the Dynamo exercise file for this video.…These are where we left off from in the last video.…In this previous exercise, we created a new family instance,…however we are not using a Dynamo point,…but an XYZ type from the Revit API, on line 33.…
This is a Revit object, which represents a point.…Let's recreate this XYZ object, after the family is created,…using the variable XYZ.…And we'll append it to our output list,…to see what it looks like in Dynamo.…Let's use the same X variable, to drive the X coordinate.…And then output that object.…And hit Run.…You can see that it has output a list of objects…that appear like coordinates of a point,…but are not actually Dynamo point objects.…
That is, we can't use them with Dynamo geometry.…This is because Dynamo and the Revit API…
Author
Released
12/14/2018Note: This course uses Dynamo 2.0.1 and Revit 2019. For best results, it helps to have the same versions of the software.
- Importing the Dynamo Geometry library
- Python basics: variables, conditionals, operators, loops, and functions
- Using and extending Python modules
- Accessing the Revit API with Python
- Revit and Dynamo conversions
- Creating a collector in the Revit API
- Getting Revit parameters with the Revit API
- Adjusting elements with the Revit API
- Creating views with the Revit API
Skill Level Intermediate
Duration
Views
Related Courses
-
Dynamo 1.x Essential Training
with Ian Siegel3h 9m Intermediate -
Dynamo for Revit Project Setup
with Ian Siegel1h 35m Intermediate -
Learning Python
with Joe Marini2h 11m Beginner -
Dynamo: Practical
with Paul F. Aubin2h 51m Intermediate -
Grasshopper and Rhino: Python Scripting
with Jeremy Graham5h 12m Intermediate
-
Introduction
-
What you should know1m 31s
-
Exercise files1m 2s
-
1. Dynamo and Python
-
The Python node basics5m 5s
-
What is OOP?5m 58s
-
Importing the Dynamo library4m 31s
-
-
2. Python Basics
-
Defining variables6m 26s
-
Numbers7m 40s
-
Strings7m 11s
-
Working with lists6m 22s
-
Control with operators5m 46s
-
Logical operators7m 14s
-
Looping with the for loop5m 17s
-
Looping with the while loop6m 22s
-
Break and continue3m 15s
-
Nested loops6m 20s
-
Dictionaries6m 37s
-
Try and except3m 55s
-
Defining functions6m 7s
-
-
3. Working with Libraries
-
Built-in Python modules6m 58s
-
Extending Python modules4m 28s
-
Saving our own module5m 6s
-
Accessing Revit nodes6m 18s
-
Importing the Revit API3m 12s
-
Working with the Revit API7m 46s
-
Revit conversions5m 53s
-
Dynamo conversions6m 57s
-
Navigating the Revit API5m 49s
-
-
4. Revit API
-
Collecting elements3m 22s
-
Creating a collector7m 14s
-
Getting Revit parameters5m 51s
-
Setting Revit parameters6m 24s
-
Element locations3m 25s
-
Adjusting elements5m 13s
-
Creating a view4m 6s
-
View bounding boxes6m 23s
-
-
Conclusion
-
Next steps2m 34s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Dynamo conversions