Tuesday, March 31, 2015

How to Use IF Statements in DynamoBIM

Its easy to use IF Statements in DynamoBIM.
All you need if 4 components

1. two nodes to compare. These are usually in the form of values, For example x=1 and y=2

2. The "Operator" Node This node compares the values in part 1 based on the operator. There are many types of operators. For example "==" means equal.

3. two nodes to define what should be done if False or if True (These nodes could be any node not just Text)

4. The "If" Node

These 4 components are summarized in the image below.

Its very simple as long as you remember to use the OPERATOR NODE that has preset comparative statements. If you cant not find them on DynamoBIM do a search for Operators in the search bar.
Note that IF Statements will not allow for "looping" in DynamoBIM. You could think about it as a one time comparison. Also what may seem confusing is the "test" input port on the If Node. That is just an operator node as discussed previously.

Good luck Comparing and If Statement..ing

No comments: