Relational and logical operators allow the computer to compare values to make decisions. Learn about the operators >, <, ==, != along with AND, OR operators to control the flow of your scripts.
- [Instructor] In previous videos,…we've been using the equals symbol…to check if two values are equal to one another.…This is known as a comparison operator…and as you can tell, comparison operators…are useful for comparing two values.…For example, if we wanted to compare…the volume of two spheres or the length of two lines,…we would use a comparison operator.…Let's have a look at some of the other comparison operators…that we can use from within Python.…In the exercise file,…you'll notice that I've created two lines…by startPoint and endPoint.…Both containing the same stop points…but different end points.…
Let's start by adding in the two curves…that have been created in Dynamo…into input zero and input one of a new Python Script node.…And then let's double-click our Python Script to open it up.…So let's recap what the equals operator does.…We know this can be used to check if two values are equal.…Let's try that on the lengths…of the two curves that we've input.…First, we need to store the incoming curves…into two different variables.…
Note: This course uses Dynamo 1.3.1 and Revit 2018. For best results, it helps to have the same versions of the software.
- Importing the Dynamo Geometry library
- Defining variables
- Making decisions with conditionals
- Controlling flow with operators
- Defining functions
- Working with external libraries in Python
- Accessing the Revit API with Python
Skill Level Beginner
1. Dynamo and Python
2. Python Basics
3. Working with Libraries
4. Revit API
Next steps2m 18s
- 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.Cancel
Take 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.