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

Revit API and IronPython types

From the course: Dynamo for Revit: Python Scripting

Start my 1-month free trial

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…

Contents