Revit 2021 – Use For Loops and If Loops in Dynamo Python

Using Dynamo and Revit together is great. Most of the tasks are relatively easily managed. However, sometimes, someone who has dabbled with programming longs for the compact way in which one can manipulate data in code. It helps keep the Dynamo script easy to read as opposed to trying to interpret the spaghetti of applying logic using Dynamo nodes and their connections.

In this video we have a quick look at how we use FOR and IF loops to cycle through elements that we gather from Dynamo. We see how we can index a counter to the elements that are selected. We also see how we can use conditional statements as triggers to perform an operation on data. The nice thing about coding is that, unless one is doing applied mathematics with geometry, all one needs is a bit of logic to get the ball rolling.

If you need help adopting Revit, BIM, and Dynamo in your practice, please contact Micrographics so we may be of assistance.

Was this helpful?

Thanks for your feedback!

About the Author

SHARE

About the Author

SHARE
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.