Goal amount for this year: 3000 USD, Received: 1207 USD (40%)

# Thread: Help with IF statement?

1. ## Help with IF statement?

I was hoping someone could help me with a simple If/Then statement in Dynamo. I'm trying to figure this out for learning purposes and can't figure out why it's not working. My goal with what you see attached, is for all Rooms larger than 500sf, to turn on a LargeArea parameter (yes/no). For some reason, it's turning all of them on. Any help would be appreciated.

2. It's setting the parameter before it gets to the "if" node. I haven't used the if node successfully before, but I'd try having only one "set parameter" node, and feeding the value from the if node, with 0 and 1 being fed in as the true/false.

3. As a learning exercise I can't help, but it seems like you could just Filter by Bool Mask, and send the two outputs to the Set parameter options...

4. I think i was making more complicated than i needed. The Bool Mask method works, but i think this way is easier.. Since The Greater Than node returns a true/false value, i just plugged that straight into the 'value' for the Element.setparameterbyname. i've attached what i did.

5. Yeah, i like the FilterbyBool in case you want to do something ELSE to the others...

6. The OOTB If node doesn't behave very well for the revit style use case unfortunately. You could use DesignScript as follows:

In this case, we're using the code format to query the following: Thing - Query - and - Thing - Other query ? if true for both : if not true for both.

Is the area greater than or equal to (>=) ten (10) AND (&&) less than or equal to (<=) twenty (20), which is capped with a question mark (?).
We then stipulate our two end conditions: What happens if true for both (middle), broken by a colon (:) an what happens if not true for both (outer).

If you wanted to use nodes instead, you could use Mark Thorley's Logic.If node in the Zebra package.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•