From the course: Dynamo for Revit: Python Scripting
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Revit API and IronPython types
From the course: Dynamo for Revit: Python Scripting
Revit API and IronPython types
- [Instructor] In an earlier video, we learnt that we are actually working in a version of Python called Iron Python. This means when working with libraries written in other languages, such as C Sharp, we sometimes come across types that are not native to Python and may need to be imported from other libraries so that we can use them. In this video, let's have a look at one type that we may come across in the Revit API, the generic list. I currently have the Revit exercise file open for this video along with the Dynamo exercise file for this video. In this script, I've gone ahead and selected two views that we created from the last video. From these views, I've created a list and then input this list into a Python script node. Inside of this node, I've unwrapped both of the views and then started a for loop through them. Within this loop is a try and accept statement. Currently in the try statement, it's trying to create a tag using the create method from the independent tag clause…
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)
-