# Hide given block of a MultiBlockdataSet

**URL:** https://discourse.vtk.org/t/hide-given-block-of-a-multiblockdataset/12233
**Category:** Support
**Created:** [September 1, 2023, 2:38pm UTC](https://discourse.vtk.org/t/hide-given-block-of-a-multiblockdataset/12233 "2023-09-01T14:38:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![BotellaA](https://discourse.vtk.org/user_avatar/discourse.vtk.org/botellaa/32/1243_2.png) [@BotellaA](https://discourse.vtk.org/u/BotellaA)
#### Post date: [September 1, 2023, 2:38pm UTC](https://discourse.vtk.org/t/hide-given-block-of-a-multiblockdataset/12233/1 "2023-09-01T14:38:04Z")

</div>

Given the following vtm file loaded as a MultiBlockDataSet, I would like to hide the block named “surfaces”. I found it difficult to understand how to use the CompositePolyDataMapper and its DisplayAttributes class to disable the display of this block.

```auto
<?xml version="1.0"?>
<VTKFile type="vtkMultiBlockDataSet" version="1.0" byte_order="LittleEndian" header_type="UInt32" compressor="vtkZLibDataCompressor">
	<vtkMultiBlockDataSet>
		<Block name="corners" index="0">
			<DataSet index="0" file="./Corner_00000000-c511-4b49-8000-000024bd4263.vtp" />
			<DataSet index="1" file="./Corner_00000000-93a3-4810-8000-00002ecc6bcb.vtp" />
			<DataSet index="2" file="./Corner_00000000-f572-4de3-8000-00008ca4592f.vtp" />
			<DataSet index="3" file="./Corner_00000000-3193-4b6e-8000-000043378094.vtp" />
			<DataSet index="4" file="./Corner_00000000-f58a-4af5-8000-0000bf70f917.vtp" />
			<DataSet index="5" file="./Corner_00000000-4df2-447d-8000-00002526f87e.vtp" />
		</Block>
		<Block name="lines" index="1">
			<DataSet index="0" file="./Line_00000000-33d6-4ebb-8000-0000e6adc95e.vtp" />
			<DataSet index="1" file="./Line_00000000-e1c7-4c74-8000-000035f8d444.vtp" />
			<DataSet index="2" file="./Line_00000000-3a23-43a2-8000-00000f636c90.vtp" />
			<DataSet index="3" file="./Line_00000000-2062-423d-8000-00001c87a213.vtp" />
			<DataSet index="4" file="./Line_00000000-00d4-46cb-8000-00008a57c9cd.vtp" />
			<DataSet index="5" file="./Line_00000000-d9df-4ee6-8000-0000d3cbc101.vtp" />
			<DataSet index="6" file="./Line_00000000-392a-457a-8000-00008c978a31.vtp" />
			<DataSet index="7" file="./Line_00000000-a37a-469e-8000-00003fed9805.vtp" />
			<DataSet index="8" file="./Line_00000000-c0a3-453b-8000-0000d0db4ee3.vtp" />
		</Block>
		<Block name="surfaces" index="2">
			<DataSet index="0" file="./Surface_00000000-453d-45e4-8000-00007acf8792.vtp" />
			<DataSet index="1" file="./Surface_00000000-7e3f-4148-8000-0000b8e302db.vtp" />
			<DataSet index="2" file="./Surface_00000000-85f1-485a-8000-00009dc9902a.vtp" />
			<DataSet index="3" file="./Surface_00000000-c3a2-42ff-8000-00000b4c7f62.vtp" />
		</Block>
	</vtkMultiBlockDataSet>
</VTKFile>

```

I tried with the mapper: `mapper.SetBlockVisibility(2, False)`  
and with the DisplayAttributes: `attributes.SetBlockVisibility(data.GetBlock(2), False)`.

Thanks for the help
