A script for joining by Material-

Hi I have been searching like crazy but cannot figure it out by myself…
How can I write a script,
that selects one layer after another,
and then select the geometry on that layer by Material,
and then joins the surfaces by their Material.
I tired many things using rhinoscript, but didnt get to far…
It sound simple at first, but is quite tricky-
Any suggestions? Please :slight_smile:

Hi @jj1, you might post what you have done so far together with an example file.