Greater or equal design script

Hello all,
I am trying to set a filter by boolean mask with values greater/less or equal to…
Not sure how to do this with design script???

Here is what the node to code comes up with.
20180726-nodeToCode

Great John,
Thank you very muuuuuuch!!!

@BIMadmin Your original solution was fine, too, at least in Dynamo 2.0, except you had < instead of <= and hadn’t connected the code block to the mask input :slight_smile:
Additionally, you could do it all in a CBN:
List.FilterByBoolMask(a1,a1>b1 && a1<=c1);

As of Dynamo 2.0, this produces a dictionary output, though, so keep that in mind. You can address the desired list by d1["in"]or d1["out"] respectively.

Many thanks Avz,

We are still on 1.3.3

but this is good to know though!

1 Like

Technically, it’s always returned a Dictionary output :slight_smile: It’s just been hidden under the hood. You can also pull the ‘dictionary’ output in 1.X versions.

DSCore.List.FilterByBoolMask(list, mask)[“in”]
DSCore.List.FilterByBoolMask(list, mask)[“out”]

The caveat to this was it didn’t play well with multiple nested lists and you had to use a different method.

3 Likes