Calculation on list through IF node

Hey all, I’m a bit new to this and trying to run a calculation on a list of elements out of Revit.

Essentially if the parameter equals S12 I want to multiply a value by 0.79 and if it’s anything else multiply it by 1.125. It’s nearly working except rather than running the calculation on each element of the list it’s running each true/false value through the entire list, thereby ending up with 68 lists of 68 elements each.

My desired result is for the calculation to be run once on each element. So if element 1 is true to multiply by 0.79, then if element 2 is false to multiply the value by 1.125 and so on. Thereby ending with a list of the original 68 values multiplied by either 0.79 or 1.125 depending on the true/false result.

Any help or a point in the right direction would be amazing! cheers.

Dynamo IF

Hi Jimmy,

If you try one of the 0.82 daily builds or the 0.81 RC build of Dynamo, the If node will fetch individual items from the list instead of the whole list. If you prefer to stick with 0.8, you could try using the formula node instead:

2015-06-19_13-18-57

Thanks Dimitar, the formula node containg the IF statement worked a treat!

Do you know where I can get 0.82/0.81? I’ve searched dynamobim and google with no luck.

Cheers.

The latest builds are available at

http://dynamobim.com/download/

http://dynamobuilds.com/

Hi,

 

my formula is working perfect…but I can not understand what is code block doing ?

check load TrueFalse AND EmergencyTRUFALSE?

check load TrueFalse OR EmergencyTRUFALSE?

I need to check muliple check from lists and trying to find most efficient way,thanks