List lacing problem

Hi there,

I’ve tried to delete compounded layers from some walls though, but I failed to lace of lists.
I set the same number of indexed between 2 lists.
Can anybody give a hint for me?

Try @L1, @L2, and Longest lacing.

Thank you for bringing your solution to me !
I, however, tried to fix as follow your solution, it’s not working properly.
Do you know what is the problem for that ?

Hey I found what the problem was.

The problem is when the node is executed, the index of the entire layer becomes -1 by every single time, so the last layer is out of range at next execute.

To solve this problem, do you have any idea?
Thank you in advance

Can you post the DYN and rvt? If you ca t upload here use a 3rd party site (Dropbox, onedrive, wetransfer, etc.)

Here are the tested files, .dyn and .rvt.

deletelayerproblem.dyn (3.8 KB) testedproject.rvt (3.0 MB)

Count the number of indices (n) in each sublist and create a range 0…n. Subtract this range from your sublist. That should give you the actual index after each previous index has been removed.

Thanks for your reply.
I understand the whole idea of your opinion.
So I’ve tried to subtract my lists used another way but hard to find a solution in dynamo forum.

Many of the related issues pointed out to SetDifference, Boolmask and Loopwhile Nodes but that didn’t help for my problem much.

Do you have any idea about that?