# Help with list lacing and levels

**URL:** <https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418>\
**Category:** Lists-Logic\
**Created:** [April 28, 2021, 9:20pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418 "2021-04-28T21:20:25Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 28, 2021, 9:20pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/1 "2021-04-28T21:20:25Z")

</div>

I want to filter to a list of sheets with sheet numbers specified in a list. This is where my understanding of lists ends. How do I use levels and lacing to achieve a list of my 19 sheets (from my code block with all the Sheet Numbers) in the “In” output of the Filter by Boolean Mask node? So far I am only getting results in the “Out” output.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/8/3803d9e6c43eddaec88c11db37984261d9989aa8.png)

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [April 28, 2021, 10:00pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/2 "2021-04-28T22:00:16Z")

</div>

A few different ways to do it. I’d probably just set the == to cross product with list levels off and that should do the trick. Or you can leave lacing on default and run X@L1, Y@default with a flatten before the input. Then you can use an ‘AnyTrue’ node, or ‘List.Contains’ with ‘true’ before your ‘BoolMask’.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 28, 2021, 10:10pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/3 "2021-04-28T22:10:29Z")

</div>

This should guide you along:

 ![Filtering List by Lists of tests](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c4c06bf349d3ed7373654d69eaf40b368eaf4cce.png)

Note that it helps to test smaller lists - around a total of 15 tests (so 5 sheets against 3 words) makes it easier to understand.

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 28, 2021, 10:56pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/4 "2021-04-28T22:56:22Z")

</div>

I see the difference in list structures at your end results, so that is helpful for my planning.  
However, I am still not getting my desired results, see below:

Your method 1 (green groups):

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/2/b293613264cbf4b8454b5a6b6d711c2584a58417.png)

Your method 2 (salmon groups):

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/3/a375503c7311f721213c48e5da4188f55e0d8ec9.png)

EDIT: I simplified the script and got the result I expected. Still, I don’t see how to apply this basic version to my original situation. Would you please bridge this gap?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9ea6dcccebee952ef8c61edbac51a92542061440.png)

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 28, 2021, 11:02pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/5 "2021-04-28T23:02:50Z")

</div>

Simply setting the == node to cross-product hasn’t solved it, take a look:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/3/93a2237bf415270953f2f1b8fe97f346d46439e7.png)

Neither did your second method work as I understand it:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/d/ed73a3da19c9e5af569a0ec8f3f7668b4a7e101c.png)

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [April 28, 2021, 11:25pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/6 "2021-04-28T23:25:53Z")

</div>

You need to use an AnyTrue or List.Contains True after the == node to get the intended result from a cross-product list. You can then feed this second list of booleans into your FilterByBoolMask.

Super quick example:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/d/3dfdbf492e387a593d2a632a3a28828a4a703b64.png)

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 28, 2021, 11:35pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/7 "2021-04-28T23:35:51Z")

</div>

That still isn’t working:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/73a0c676365442363ced8b3840b3cb4ebae73226.png)

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [April 28, 2021, 11:39pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/8 "2021-04-28T23:39:30Z")

</div>

Your mask has been sorted but your list hasn’t, so you’re using the right true/false value but on the wrong list. Either feed the sorted list into the BoolMask, or skip the sort node and sort after filtering.

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 28, 2021, 11:41pm UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/9 "2021-04-28T23:41:49Z")

</div>

That did it. I was convinced I had done the lacing or levels incorrectly so I didn’t catch my unfinished sorting. Thank you.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 29, 2021, 12:29am UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/10 "2021-04-29T00:29:32Z")

</div>

My example utilized Auto lacing in all cases - you set the nodes to longest which will change the way the nodes process the data. 🙂

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 29, 2021, 3:40am UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/11 "2021-04-29T03:40:14Z")

</div>

I looked for Auto lacing but I didn’t see it in the lacing options. I tried unchecking Longest but that just went to Shortest. I’m using Dynamo in Revit 2019, could that be why I don’t see Auto?

---

<div class="post-metadata">

**Author:** ![Hamish](https://avatars.discourse-cdn.com/v4/letter/h/a5b964/32.png) [@Hamish](https://forum.dynamobim.com/u/Hamish)\
**Post date:** [April 29, 2021, 3:50am UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/12 "2021-04-29T03:50:14Z")

</div>

Which Dynamo version? Pretty sure it was a thing in Dynamo 2.X in Revit 2019, but I might have it the wrong way around.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [April 29, 2021, 4:45am UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/13 "2021-04-29T04:45:14Z")

</div>

Likely you’re in the version of Dynamo which comes pre-installed with Revit 2019. I blieve it’s 1.3.2 or 1.3.4. I highly recommend upgrading to 2.0.4 as that will enable the graphs you build for 2019 can be more easily upgraded to work in Revit 2020 and beyond, where there is a file format change with the 2.3 or later format.

---

<div class="post-metadata">

**Author:** ![Redrunner262](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/redrunner262/32/118682_2.png) [@Redrunner262](https://forum.dynamobim.com/u/Redrunner262)\
**Post date:** [April 30, 2021, 1:18am UTC](https://forum.dynamobim.com/t/help-with-list-lacing-and-levels/63418/14 "2021-04-30T01:18:01Z")

</div>

You’re right, I haven’t installed any updates. I’ll do so, thanks for the suggestion!
