Grouping object types

I’ve selected some model elements. These can be columns, filled regions or lines.

I want to separate them by type. I could put in a load of bool masks (did it for the lines) but I thought Python would be neater… But I can’t get it to work. What am I doing wrong?

Hi @Alien ,

Have you tried the node List.GroupByKey?

1 Like

Actually trying the group by key now and making a right mess so far :joy:

I think List.RemoveIfNot is the node you want

It’s just dawned on me I was using sort by key not group.

Doh! I’d still like someone to show me how to do it in Python though if anyone knows please. :slight_smile:

Ever have one of those days where you stare at the screen for 6+ hours and get nowhere? Even when you’ve done the same sort of thing 50x before… Then suddenly at 5.30pm you wake up and within 2 hours you’ve done a day’s work… But then think… It’s Friday and I’ve just finished work at 7.30… ARRGH.

At least I have forum birthday :cake: :partying_face: :laughing: