How to set wall layer thickness

Hi All,

Any help on this would be much appreciated. I am trying to set the thickness of a wall layer in Revit. Is this possible, and if so would you mind sharing how?

Many thanks

Nebille

Heres a code that seems to work, I butchered an existing code that I found however it seems to crash revit.

Any ideas??

Wall Layer Code

Hmmm silly me, works in Revit 2016. I was testing in 2014. It was very late.