Layer Control- viewing

Is there a way to have a layer control (ON/OFF etc) as a Viewport is setup?
I would like to be able to export (as Block) only the items on those layers that are visible in a certain viewport.

Be good to save as a Layerstate.

Are there any options here please to simplify my needs?