Coloring ceilings wih and without slope. Linked model

Hi.

I’am trying to make dynamo override the color in view of the Ceiling with or without slope.(from a LINKED MODEL)
Example. All the ceiling without slope should be green and all the ceiling with slope should have a different color depending of the slope.

I have make a script and there is no error, but nothing happens.

Anyone want to help ?

Best regards
Kasper
Denmark.

Hello,
I tried, I get this result but I don’t have a linked file (hoping to help a little)


image

Cordially
christian.stan