Delete element

Hello friend
I want to delete dimentions that have same value to only have one of that dimention. How can I do that?tnx

Assuming the values are identical, use list.indexof and this will only get the first index of each occurence. From there, use list.getitematindex on the dimensions, and finally use set.difference to get all dimension elements that were not first occurences by comparing the output of list.getitematindex with the dimension list.

3 Likes

List.GroupByKey to pair up common elements by the key, followed by List.DropItems to remove the first item from every sublist should also work. You’ll get some empty lists but in my experience this is a tad faster than the first index based methods (that might be outdated advice now though).

2 Likes

Hi don’t forget the square pieces or the repetitive frames :wink:
cordially
christian.stan

I do like bellow pic

the value
cordially
christian.stan

1 Like

I guess Jacob mean as here…you probably need some rounding with your value as well…not sure

2 Likes

Precisely what I meant. :slight_smile:

1 Like