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.

Control with operators

Control with operators

From the course: Dynamo for Revit: Python Scripting

Start my 1-month free trial

Control with operators

- [Instructor] In previous videos, we've been using the equal to symbol to check equality of values. This is known as a comparison operator. Comparison operators are useful for comparing one value to another. For example, if we wanted to compare the volume of two spheres or the length of two lines, we would do so by using comparison operators. So let's have a look at some of the other comparison operators we can use in Python. To start, open up the Dynamo exercise file for this video. In this file, you'll notice that I've gone ahead and created two lines by start point, end point. Both of these contain the same start points but different end points. We can see these lines by changing the script to Automatic in the bottom left. And now in the background, you can see that we have two lines. So let's input both of these lines into input zero and input one, respectively, and open up the Python script. Let's start by recapping what the equal to operator does. This can be used to check if…

Contents