pyvista.MultiBlock.set_block_name#
- MultiBlock.set_block_name(index: int, name: str | None) None [source]#
Set a block’s string name at the specified index.
- Parameters:
Examples
>>> import pyvista as pv >>> data = { ... 'cube': pv.Cube(), ... 'sphere': pv.Sphere(center=(2, 2, 0)), ... } >>> blocks = pv.MultiBlock(data) >>> blocks.append(pv.Cone()) >>> blocks.set_block_name(2, 'cone') >>> blocks.keys() ['cube', 'sphere', 'cone']