Match lists after FilterByBoolmask

Hi there,

very basic question here.

I have a script to assign materialcode and thickness to parts, and it works fine.

I get the code from the material within the part, and the thickness from the Part itself.

But this is a bit simplistic, getting the tickness is not relevant to all the layers of these system families. So I put a Filter on a value within the material that expresses wheter thickness should be added to the parameter that identifies the part.

Now I have to join two lists with different length, how do I lace this in order to match the data in a corresponding way?

I am getting the first 6 thicknesses, I should select the ones indicated in green.

Kind regards,

Willem

You either need to filter both lists in parallel or get the thickness after you’ve filtered by material.

1 Like

Getting Thickness after the filter on material was what tried first, but the thickness is contained within the part itself, not it’s material.

To filter both lists in parallel…it wouldn’t surprise me if the solution is embarrassingly simple, but I didn’t succeed.
Get material value from part selectie+ dikte 02.dyn (70.4 KB)

In that case you’d have to filter the element in parallel too so you might as well do that with the thickness. Can you show us what you’ve tried? You should just be able to filter both parameter values the same way.

Gavin Crump has some great videos on youtube about Dynamo, lacing, and list leveling. I highly suggest watching them.

quick demo of filtering two lists in paralell though.

My lists are items at level two of the 3 level list. So I set its level to 2. Lacing can be left at auto for this.Coming out I can grab index 0 from my bool mask for the top list and index 1 from my mask for the bottom list.

It was in the lists indeed.

The video’s are really helpful.

Putting the lacing to longest in the "list filter by Boolmask " did it.

Thank you @Nick_Boyts & @J_Sanford
Get material value from part selectie+ dikte 03.dyn (44.3 KB)

1 Like