How to select sheets by a list?

Hi,

I trying to select the sheet number is A101 or A103 from the model. why the code block is not work?

I also trying to use a excel to create a list for the sheets. how to use a list to replace the code block?

Thanks,

Thank you guys, my problem is solved.


the “List.Equals” code’s lacing is longest.

If you use a boolean operator in a code block, the values will be handled as booleans. If you open the preview of the code block, it just sends true, because true or true = true.
Use something like this for this filtering:

Don’t forget to set the lacing to Cross product on the == node. More info about lacing in the primer: https://primer.dynamobim.org/06_Designing-with-Lists/6-1_whats-a-list.html#lacing

This solution also solves your second problem, as in this example I replaced your codeblock with a simple list.

1 Like

As @infeeeee mentioned, you don’t have a complete condition in your conditional code block. You need a variable to check against those values.

num == "A101" || num == "A103";

1 Like