GH_Exposure primary + obscure

I’m reading GH_Exposure Enumeration in the grasshopper API documentation GH_Exposure Enumeration

for obscure, it says:

You must combine obscure with one of the other flags

I’m using it by itself and it works fine, but I’m curious, how do I combine it with another flag?
Attempted the following:

GH_Exposure.primary|GH_Exposure.obscure
( GH_Exposure) 2+65536

both just results in it being set to obscure

Enum flags ought to be combined the way you did, using the vertical bar | operator in C#, or using the Or operator in VB.

It works because I added the following lines of code to the layout algorithm, because I knew there are people like you :slight_smile:

'Fix illegal Obscure-only flags
If (exp0 = 0) Then exp0 = GH_Exposure.septenary
If (exp1 = 0) Then exp1 = GH_Exposure.septenary

So GH_Exposure.obscure is automatically converted into GH_Exposure.septenary | GH_Exposure.obscure, which is probably not what you want but it prevents the layout logic from choking.

Thanks for the explanation
Tried GH_Exposure.primary|GH_Exposure.obscure again and it does indeed work, not sure why I thought it didn’t before, I was probably using the wrong gha