get_block_name

MultiBlock.get_block_name(index: int) Optional[str]

Return the string name of the block at the given index.

Parameters
indexint

Index of the block to get the name of.

Returns
str

Name of the block at the given index.

Examples

>>> import pyvista as pv
>>> data = {"cube": pv.Cube(), "sphere": pv.Sphere(center=(2, 2, 0))}
>>> blocks = pv.MultiBlock(data)
>>> blocks.get_block_name(0)
'cube'