Skip to main content

get_block_visibility()

Returns the visibility state of a block.

The visibility state is tracked internally and persists across render cycles. Defaults to True for blocks not yet tracked.

Parameters
  • block_name (str) — The name of the block to check.
Returns
  • boolTrue if the block is visible, False otherwise.

Example

from pyemsi import Plotter, examples

file_path = examples.transient_path()
plt = Plotter(file_path)

# The transient example has blocks '1', '3', and '4'
print(plt.get_block_visibility("4")) # True

plt.set_block_visibility("4", False)
print(plt.get_block_visibility("4")) # False

See Also