Diabling Piece Menu Items

I’ve been trying to implement a piece trait where piece menu items are disabled (or hidden) based on the facing (displayed layer) of the piece.
I figured it would be simple to add a ‘Restricted Command’ trait, restricting certain menu commands based on an expression evaluation of the current piece layer. But this doesn’t seems to work.
Anyone have any suggestion?

I used it often and it works fine.
You can use an expression like: <Layer_Name>_Level=.
The propertyname of the Layer is case sensitive.

Thanks Dulgin.
I’m sure it must be possible but ever iteration I try nothing works.
There must be something I’m missing.
I don’t see a property Layer_Name, do you know where this comes from?

That’s the name you gave the layer. So if you have a layer named Facing, with say 4 levels, and you want a CTRL A command only enabled when your Facing layer is in level 1, then your Restrict Commands trait would have a property match of: Facing_Level != 1, restricting: CTRL A.

Check the help buttons too… lots of great, readily available info.