API Reference
Find the index number by block name.
str
Name of the block.
int
Index of the block.
Examples
>>> import pyvista as pv >>> data = {"cube": pv.Cube(), "sphere": pv.Sphere(center=(2, 2, 0))} >>> blocks = pv.MultiBlock(data) >>> blocks.get_index_by_name('sphere') 1